@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

/* "Pulse" — the same brand numeral face the Bitegit app uses for prices/amounts
   (pulled straight from the app's res/font). Bitget's own site uses it too. */
@font-face { font-family: 'Pulse'; src: url('/fonts/pulse-regular.ttf') format('truetype');  font-weight: 400; font-display: swap; }
@font-face { font-family: 'Pulse'; src: url('/fonts/pulse-medium.ttf') format('truetype');   font-weight: 500; font-display: swap; }
@font-face { font-family: 'Pulse'; src: url('/fonts/pulse-semibold.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Pulse'; src: url('/fonts/pulse-bold.ttf') format('truetype');     font-weight: 700; font-display: swap; }

:root {
  --p2p-bg: #000;
  --p2p-panel: #0d0d0d;
  --p2p-panel-2: #111;
  --p2p-line: rgba(255, 255, 255, 0.07);
  --p2p-text: #f4f8ff;
  --p2p-muted: #6b7a99;
  --p2p-green: #00b8d4;
  --p2p-red: #ff5f82;
  --p2p-accent: #00b8d4;
  --p2p-brand: #00b8d4;
  --p2p-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }

/* Prevent iOS zoom-in on input focus */
input, textarea, select {
  font-size: 16px !important;
  touch-action: manipulation;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
}

body.p2p-page {
  min-height: 100vh;
  font-family: 'Pulse', 'Manrope', sans-serif;
  /* #0a0c10 is this app's site-wide dark-surface colour (header/subnav/panels
     all share it — see the ~40 other uses of #0a0c10 in this file). bitget.com
     measures fractionally darker (#070808) but its offer cards carry NO
     background of their own either (transparent, see .gt-card below) — the
     structural fact worth matching is "card has no independent fill, it's
     just the ambient page colour", which holds here without introducing a
     two-tone seam against our own header/subnav. */
  background: #0a0c10;
  color: var(--p2p-text);
}

/* p2p.html never renders the shared 5-tab .mobile-app-nav (no app-nav.js /
   <nav class="mobile-app-nav"> here — P2P uses its own .p2p-mobile-bottom-nav
   instead), but the body still carried the "has-mobile-nav" class, so
   mobile-nav.css's 68px reserved padding-bottom was dead space with no bar
   to show for it, cutting the offer list short for nothing. Zero it out —
   the P2P board already reserves room for its own bottom nav elsewhere. */
@media (max-width: 768px) {
  body.p2p-page.has-mobile-nav {
    padding-bottom: 0;
  }
}

body.p2p-page,
body.p2p-page * {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body.p2p-page::-webkit-scrollbar,
body.p2p-page *::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

body.p2p-nav-open,
body.p2p-order-open,
body.p2p-deal-open,
body.p2p-kyc-open { overflow: hidden; }

.hidden { display: none !important; }
.hidden-control { display: none !important; }

/* Legacy order modal permanently hidden — bf screens replace it */
#orderModal { display: none !important; }
.mobile-only { display: block; }
.desktop-only { display: none; }

/* ── Header ── */
.p2p-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(10, 12, 16, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--p2p-line);
}

.p2p-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.p2p-brand-wrap {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.p2p-brand {
  display: flex;
  align-items: center;
  gap: 0.62rem;
  text-decoration: none;
}

.p2p-brand-logo {
  width: 34px;
  height: 34px;
  padding: 2px;
  display: block;
  border-radius: 11px;
  background: linear-gradient(180deg, rgba(8, 18, 28, 0.96), rgba(3, 8, 16, 0.96));
  object-fit: contain;
  flex: 0 0 auto;
  box-shadow:
    inset 0 0 0 1px rgba(87, 206, 255, 0.18),
    0 0 16px rgba(45, 214, 255, 0.16),
    0 8px 18px rgba(0, 0, 0, 0.3);
}

.p2p-brand-mark {
  width: 26px;
  height: 26px;
  background: var(--p2p-brand);
  border-radius: 6px;
  display: inline-block;
}

.p2p-brand-word {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--p2p-text);
}

.p2p-main-nav {
  display: flex;
  gap: 1.5rem;
  flex: 1;
}

.p2p-main-nav a {
  color: var(--p2p-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
  white-space: nowrap;
}

.p2p-main-nav a:hover,
.p2p-main-nav a.active { color: var(--p2p-text); }

.p2p-header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-left: auto;
}

.p2p-login-btn {
  color: var(--p2p-text);
  background: none;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border: 1px solid rgba(201, 220, 255, 0.2);
  border-radius: 8px;
  transition: border-color 0.2s;
  white-space: nowrap;
  font-family: 'Pulse', 'Manrope', sans-serif;
}

.p2p-login-btn:hover { border-color: rgba(201, 220, 255, 0.5); }

.p2p-signup-btn {
  background: var(--p2p-brand);
  color: #050808;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.42rem 1.1rem;
  border-radius: 8px;
  transition: opacity 0.2s;
  white-space: nowrap;
  border: none;
}

.p2p-signup-btn:hover { opacity: 0.85; }

/* Header account/profile avatar — the real, always-visible entry point into
   the profile screen for a logged-in user (rebuilt 2026-09-06, see mobProfileScreen
   markup for the destination). Same gradient as .bg-profile-avatar so the header
   icon and the panel's own hero avatar read as the same identity. */
.p2p-avatar-btn {
  /* 24x24 to match bitget.com's real header avatar (data-testid="MicroUserIcon",
     class .micro-bit-avatar), measured live on bitget.com/p2p-trade at 375px
     2026-09-06: rect w/h = 24/24. */
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg,#1b4bff,#00d2d8);
  color: #fff;
  border: none;
  font-size: 0.6rem;
  font-weight: 800;
  font-family: 'Pulse', 'Manrope', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  background-size: cover;
  background-position: center;
  -webkit-tap-highlight-color: transparent;
}
.p2p-avatar-btn.has-image { color: transparent; }

/* Default fallback (no real profile photo yet): show the app's own "B" brand
   mark instead of a colored circle + random initial letter (2026-09-06). The
   gradient stays as the base rule above for legacy/unused paths, but this
   modifier wins wherever JS applies it. */
.p2p-avatar-btn.avatar-brand-fallback,
.bg-profile-avatar.avatar-brand-fallback,
.p2p-profile-avatar.avatar-brand-fallback {
  background-color: #16171c;
  /* Bumped 78% -> 90% (2026-09-06): user asked for the "B" mark bigger/bolder
     inside the avatar circle. */
  background-image: url('/logos/bitegit-app.png');
  background-size: 90%;
  background-position: center;
  background-repeat: no-repeat;
  color: transparent;
}

.p2p-user-btn {
  background: rgba(139, 243, 0, 0.1);
  color: var(--p2p-text);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.42rem 1.1rem;
  border-radius: 8px;
  border: 1px solid rgba(139, 243, 0, 0.25);
  white-space: nowrap;
}

.p2p-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.p2p-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--p2p-text);
  border-radius: 2px;
}

/* ── Mobile drawer ── */
.p2p-nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 300;
}

.p2p-nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(320px, 85vw);
  height: 100%;
  background: #0b0b0b;
  z-index: 400;
  transform: translateX(100%);
  transition: transform 0.28s ease;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--p2p-line);
}

.p2p-nav-drawer.is-open { transform: translateX(0); }

.p2p-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--p2p-line);
  font-weight: 700;
  font-size: 1rem;
}

.p2p-drawer-head strong {
  display: inline-flex;
  align-items: center;
  gap: 0.58rem;
}

.p2p-drawer-head button {
  background: none;
  border: none;
  color: var(--p2p-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.2rem;
}

.p2p-drawer-links {
  display: flex;
  flex-direction: column;
  padding: 1rem 0;
  gap: 0;
  flex: 1;
}

.p2p-drawer-links a {
  color: var(--p2p-text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.15s;
}

.p2p-drawer-links a:hover { background: rgba(255, 255, 255, 0.04); }

.p2p-drawer-actions {
  display: flex;
  flex-direction: column;
  padding: 1rem 1.25rem;
  gap: 0.5rem;
  border-top: 1px solid var(--p2p-line);
}

.p2p-drawer-actions button,
.p2p-drawer-actions a {
  min-height: 42px;
  border-radius: 10px;
  border: 1px solid var(--p2p-line);
  background: transparent;
  color: var(--p2p-text);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: 'Pulse', 'Manrope', sans-serif;
}

.p2p-drawer-actions a:last-child,
.p2p-drawer-actions button:last-child {
  background: var(--p2p-brand);
  border-color: transparent;
  color: #050808;
}

/* ── P2P mode title row ("P2P trading ▾") ── */
.p2p-title-row {
  background: #0a0c10;
  border-bottom: 1px solid var(--p2p-line);
}
.p2p-title-wrap {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.65rem 1.5rem;
}
.p2p-title-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: #fff;
  /* measured on bitget.com/p2p-trade (375x812): "P2P trading" is 18px,
     weight 400 (regular, not bold) — buttons don't inherit the page font
     by default, so without font-family:inherit this fell back to the
     browser's UA button font (Arial) instead of Pulse/Manrope. */
  font-family: inherit;
  font-size: 18px;
  font-weight: 400;
  line-height: 24px;
  -webkit-tap-highlight-color: transparent;
}
.p2p-title-btn svg { color: var(--p2p-muted); transition: transform 0.2s; flex-shrink: 0; }
.p2p-title-btn.open svg { transform: rotate(180deg); }
.p2p-title-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 1.5rem;
  z-index: 210;
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 6px;
  min-width: 160px;
  box-shadow: var(--p2p-shadow);
}
.p2p-title-dropdown.open { display: block; }
.p2p-title-item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: #d0d5e0;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  cursor: pointer;
}
.p2p-title-item:hover { background: rgba(255, 255, 255, 0.06); }
.p2p-title-item.active { color: var(--p2p-brand); }

/* ── Sub-nav ── */
.p2p-subnav {
  background: #0a0c10;
  border-bottom: 1px solid var(--p2p-line);
  position: sticky;
  top: 60px;
  z-index: 190;
}

.p2p-subnav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 44px;
  display: flex;
  align-items: center;
  /* Only .p2p-subnav-right-wrap lives here now (Express/P2P/Block Trade tab
     row was removed 2026-09-05 — those two now live in the "More" dropdown),
     so push it to the right instead of space-between spreading a single
     child to flex-start. */
  justify-content: flex-end;
}

.p2p-subnav-left,
.p2p-subnav-right,
.p2p-subnav-right-wrap {
  display: flex;
  align-items: center;
  gap: 0;
}

.p2p-subnav-left a,
.p2p-subnav-right a {
  color: var(--p2p-muted);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0 0.85rem;
  height: 44px;
  display: flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.p2p-subnav-left a:hover,
.p2p-subnav-right a:hover { color: var(--p2p-text); }

.p2p-subnav-left a.active {
  color: var(--p2p-text);
  border-bottom-color: var(--p2p-brand);
}

/* ── 3-dot menu ── */
.p2p-dot-menu-wrap { position: relative; display: flex; align-items: center; }
.p2p-dot-btn { background: none; border: none; cursor: pointer; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 3px; padding: 0 0.95rem; min-width: 44px; height: 44px; -webkit-tap-highlight-color: transparent; }
.p2p-dot-btn span { display: block; width: 4px; height: 4px; border-radius: 50%; background: #8a97ae; }
/* Re-measured against bitget.com/p2p-trade's real "More" dropdown 2026-09-05:
   flat list (no dividers), rounded-8px hover state per row, 12px container
   radius, 8px container padding, whitespace-nowrap, and a "More ✕" head row
   on mobile. */
.p2p-dot-dropdown { display: none; position: absolute; top: calc(100% + 4px); right: 0; background: #111; border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; min-width: 210px; z-index: 900; overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,0.6); padding: 8px; white-space: nowrap; }
.p2p-dot-dropdown.open { display: block; }
.p2p-dot-dropdown-head { display: flex; align-items: center; justify-content: space-between; height: 40px; padding: 0 8px; color: #f4f5f7; font-size: 0.9rem; font-weight: 600; font-family: 'Pulse', 'Manrope', sans-serif; }
.p2p-dot-dropdown-close { background: none; border: none; color: #d0d5e0; cursor: pointer; padding: 4px; display: flex; -webkit-tap-highlight-color: transparent; }
.p2p-dot-item { display: flex; align-items: center; width: 100%; background: none; border: none; border-radius: 8px; text-align: left; padding: 0 15px; height: 40px; font-size: 0.875rem; color: #d0d5e0; font-family: 'Pulse', 'Manrope', sans-serif; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.p2p-dot-item:hover, .p2p-dot-item:active { background: rgba(255,255,255,0.06); }

/* ── Info screens (Merchant / FAQ) ── */
.p2p-info-screen { flex-direction: column; }
.merch-card { background: #111; border: 1px solid rgba(255,255,255,0.08); border-radius: 14px; padding: 1rem 1.1rem; margin-bottom: 0.9rem; }
.merch-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.7rem; font-size: 0.92rem; font-weight: 700; color: #fff; }
.merch-badge { font-size: 1rem; }
.merch-badge-cert { color: #00b8d4; }
.merch-badge-blue { color: #2563eb; }
.merch-badge-crown { color: #00b8d4; }
.merch-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.45rem; }
.merch-list li { font-size: 0.78rem; color: #8a97ae; padding-left: 1.2rem; position: relative; line-height: 1.5; }
.merch-list li::before { content: '✓'; position: absolute; left: 0; color: #00b8d4; font-size: 0.7rem; }
.merch-steps { display: flex; flex-direction: column; align-items: center; gap: 0; }
.merch-step { text-align: center; padding: 0.6rem 0; }
.merch-step-icon { font-size: 1.8rem; margin-bottom: 0.3rem; }
.merch-step p { font-size: 0.8rem; color: #8a97ae; margin: 0; }
.merch-step-divider { width: 2px; height: 24px; background: rgba(0,184,212,0.3); }

/* ── FAQ accordion ── */
.faq-section { border-bottom: 1px solid rgba(255,255,255,0.07); }
.faq-section-head { display: flex; justify-content: space-between; align-items: center; padding: 1rem; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.faq-section-head span { font-size: 16px; font-weight: 600; line-height: 22.4px; color: var(--p2p-text); }
.faq-arrow { color: #6b7690; flex-shrink: 0; transition: transform 0.2s; }
.faq-section.open .faq-arrow { transform: rotate(180deg); }
.faq-section-body { display: none; padding: 0 1rem 1rem; font-size: 0.78rem; color: #8a97ae; line-height: 1.7; }
.faq-section.open .faq-section-body { display: block; }
.faq-links { display: flex; flex-direction: column; gap: 0; padding-top: 0; }
.faq-links a { display: block; padding: 0.6rem 0; font-size: 0.82rem; color: #8a97ae; border-bottom: 1px solid rgba(255,255,255,0.05); cursor: pointer; }
.faq-links a:last-child { border-bottom: none; }

/* ── Shared section title/head for How-to-trade / P2P news / FAQ / Payment methods ── */
.p2p-section-title {
  margin: 0 0 1rem;
  font-size: 28px; /* measured: bitget.com/p2p-trade H2 (How to trade/P2P news/FAQ), constant across breakpoints */
  font-weight: 700;
  line-height: 34px;
  color: var(--p2p-text);
}
.p2p-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.p2p-section-head .p2p-section-title { margin-bottom: 0; }
.p2p-section-more {
  color: #fff; /* measured: bitget "More" span is text-ds-color-always-white, not muted */
  font-size: 14px;
  font-weight: 500;
  line-height: 18px;
  text-decoration: none;
  white-space: nowrap;
}
.p2p-section-more:hover { color: var(--p2p-text); }

/* ── How to trade on P2P ── */
.p2p-howto {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  border-top: 8px solid var(--p2p-panel);
}
.p2p-howto-tabs {
  display: inline-flex;
  background: var(--p2p-panel);
  border-radius: 10px;
  padding: 3px;
  margin-bottom: 2rem;
  gap: 2px;
}
.p2p-howto-tab {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--p2p-muted);
  font-size: 12px; /* measured: bitget .bit-radio-button__inner */
  font-weight: 500;
  line-height: 12px;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}
.p2p-howto-tab.active { background: var(--p2p-panel-2); color: var(--p2p-text); }
.p2p-howto-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.p2p-howto-step {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.9rem;
}
.p2p-howto-step img { width: 64px; height: 64px; }
.p2p-howto-step h3 {
  margin: 0 0 16px; /* measured: bitget H3 mb-16px (mt-24px omitted: our flex `gap` on .p2p-howto-step already provides the img->h3 spacing) */
  font-size: 20px;
  font-weight: 600;
  line-height: 34px;
  color: var(--p2p-text);
}
.p2p-howto-step p {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  color: #8e8e92; /* measured: bitget text-ds-color-text-tertiary, not close enough to --p2p-muted to reuse */
}

/* ── P2P news ── */
.p2p-news {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem 2.5rem;
}
.p2p-news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}
.p2p-news-card {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  text-decoration: none;
  border: 1px solid var(--p2p-line);
  border-radius: 14px;
  padding: 1.1rem;
  background: var(--p2p-panel);
  transition: border-color 0.15s, transform 0.15s;
}
.p2p-news-card:hover { border-color: rgba(0, 184, 212, 0.4); transform: translateY(-2px); }
.p2p-news-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: var(--p2p-line);
}
.p2p-news-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.p2p-news-card h3 {
  margin: 20px 0 8px; /* measured: bitget H3 mt-20px mb-8px */
  font-size: 20px;
  font-weight: 600;
  color: var(--p2p-text);
  line-height: 20px;
}
.p2p-news-date { font-size: 0.76rem; color: var(--p2p-muted); }

/* ── FAQ block (category tabs + accordion) ── */
.p2p-faq-block {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem 2.5rem;
}
.p2p-faq-cats {
  display: flex;
  gap: 1.6rem;
  border-bottom: 1px solid var(--p2p-line);
  margin-bottom: 0.4rem;
}
.p2p-faq-cat-tab {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--p2p-muted);
  font-size: 12px; /* measured: bitget .bit-radio-button__inner (same control used for howto/faq tabs) */
  font-weight: 500;
  line-height: 12px;
  padding: 0 0 0.8rem;
  border-bottom: 2px solid transparent;
}
.p2p-faq-cat-tab.active { color: var(--p2p-text); border-bottom-color: var(--p2p-brand); }
.p2p-faq-list .faq-section:last-child { border-bottom: none; }
.p2p-faq-list .faq-section-head { padding: 1rem 0; }
.p2p-faq-list .faq-section-body { padding: 0 0 1rem; }

/* ── Popular payment methods ── */
.p2p-payment-methods {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}
.p2p-payment-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.p2p-payment-chip {
  background: var(--p2p-panel);
  border: 1px solid var(--p2p-line);
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #d0d5e0;
}

@media (max-width: 860px) {
  .p2p-howto-steps { grid-template-columns: 1fr; gap: 1.6rem; }
  .p2p-news-grid { grid-template-columns: 1fr; }
  .p2p-howto,
  .p2p-news,
  .p2p-faq-block,
  .p2p-payment-methods { padding-left: 1rem; padding-right: 1rem; }
  .p2p-faq-cats { gap: 1.1rem; overflow-x: auto; }
}

/* ── Payment Method Cards ── */
.pm-card { display:flex; justify-content:space-between; align-items:center; background:#111; border:1px solid rgba(255,255,255,0.07); border-radius:12px; padding:0.85rem 1rem; margin-bottom:0.65rem; gap:0.5rem; }
.pm-card-left { display:flex; align-items:center; gap:0.75rem; min-width:0; }
.pm-icon { font-size:1.5rem; flex-shrink:0; }
.pm-name { font-size:0.85rem; font-weight:700; color:#fff; }
.pm-detail { font-size:0.73rem; color:#6b7690; margin-top:2px; }
.pm-card-actions { display:flex; gap:0.4rem; flex-shrink:0; }
.pm-btn { height:28px; padding:0 0.7rem; border:none; border-radius:6px; font-size:0.72rem; font-weight:700; cursor:pointer; font-family:'Pulse','Manrope',sans-serif; -webkit-tap-highlight-color:transparent; }
.pm-edit { background:rgba(0,184,212,0.15); color:#00b8d4; }
.pm-del { background:rgba(246,70,93,0.12); color:#f6465d; }

/* ── Main wrap ── */
.p2p-main-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem 6rem;
}
/* Mobile: remove top gap since hero is hidden */
@media (max-width: 768px) {
  .p2p-main-wrap { padding-top: 0 !important; }
  .p2p-board { padding-top: 0.5rem; }
}

/* ── P2P Brand Hero ── */
.p2p-brand-hero {
  background: #0a0c10;
  padding: 1.4rem 0 0.8rem;
  text-align: center;
}
.p2p-brand-hero-inner { max-width: 480px; margin: 0 auto; padding: 0 1rem; }
.p2p-brand-hero-logo {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  line-height: 1;
}
.p2p-bh-name {
  font-size: 2.2rem;
  font-weight: 900;
  color: #00b8d4;
  letter-spacing: 0.06em;
  font-family: 'Pulse', 'Manrope', sans-serif;
}
.p2p-bh-tag {
  font-size: 0.9rem;
  font-weight: 700;
  color: rgba(0,184,212,0.55);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.15rem;
}
.p2p-bh-desc {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  color: #6b7690;
  line-height: 1.5;
}
.p2p-bh-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 0.85rem;
}
.p2p-bh-stats div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.p2p-bh-stats strong {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
}
.p2p-bh-stats span {
  font-size: 0.68rem;
  color: #6b7690;
  letter-spacing: 0.02em;
}
@media (max-width: 768px) {
  .p2p-brand-hero { padding: 1rem 0 0.6rem; }
  .p2p-bh-name { font-size: 1.8rem; }
}

/* ── Hero (hidden) ── */
.p2p-hero { display: none !important; }

.p2p-hero-left h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 800;
  color: var(--p2p-text);
  line-height: 1.2;
}

.p2p-hero-left p {
  margin: 0.4rem 0 0;
  color: var(--p2p-muted);
  font-size: 0.88rem;
}

.p2p-hero-stats {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.75rem;
}

.p2p-hero-stats div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.p2p-hero-stats strong {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--p2p-text);
}

.p2p-hero-stats span {
  font-size: 0.72rem;
  color: var(--p2p-muted);
}

.p2p-hero-right {
  flex-shrink: 0;
}

.p2p-promo-banner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: linear-gradient(135deg, #0d1b2a 0%, #0f2a1a 100%);
  border: 1px solid rgba(139, 243, 0, 0.15);
  border-radius: 14px;
  padding: 1rem 1.5rem;
  min-width: 300px;
  max-width: 380px;
  overflow: hidden;
  position: relative;
}

.p2p-promo-content { flex: 1; }

.p2p-promo-title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--p2p-text);
  line-height: 1.3;
}

.p2p-promo-sub {
  margin: 0.3rem 0 0;
  font-size: 0.78rem;
  color: var(--p2p-muted);
}

.p2p-promo-art {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(139, 243, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.promo-coin {
  font-size: 1.5rem;
  color: var(--p2p-brand);
  font-weight: 800;
}

/* ── Board ── */
.p2p-board {
  margin-bottom: 2rem;
}

.p2p-intro {
  padding: 1.5rem 0 1rem;
}
.p2p-intro-title {
  margin: 0 0 0.6rem;
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--p2p-text);
  line-height: 1.25;
}
.p2p-intro-sub {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--p2p-muted);
  max-width: 640px;
}
@media (max-width: 768px) {
  /* measured against bitget.com/p2p-trade at 375x812, 2026-09-06
     (getComputedStyle diff, 6-pass verification): H1 28px/700, line-height
     34px, margin-bottom 12px, pure white. Paragraph 14px/400, line-height
     23px, rgb(255,255,255). Gap from paragraph bottom to the Buy/Sell
     toggle row is 50px (30px intro bottom padding + 20px row gap). */
  .p2p-intro { padding: 30px 0 50px; }
  .p2p-intro-title { font-size: 28px; font-weight: 700; line-height: 34px; margin-bottom: 12px; color: #fff; }
  .p2p-intro-sub { font-size: 14px; line-height: 23px; color: #fff; }
}

.p2p-board-topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--p2p-line);
}

.p2p-board-topbar-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding-bottom: 0.6rem;
}

/* ── Buy / Sell tabs (Gate.io underline style) ── */
.p2p-side-tabs {
  display: flex;
  gap: 0;
}

.side-tab {
  min-height: 44px;
  padding: 0 1.2rem;
  border-radius: 0;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--p2p-muted);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  font-family: 'Pulse', 'Manrope', sans-serif;
}

.side-tab:hover { color: var(--p2p-text); }

.side-tab[data-side='buy'].active {
  color: var(--p2p-text);
  border-bottom-color: var(--p2p-green);
  background: transparent;
}

.side-tab[data-side='sell'].active {
  color: var(--p2p-text);
  border-bottom-color: var(--p2p-red);
  background: transparent;
}

/* ===== GATE.IO CONTROLS ===== */
/* ── scroll-hide wrapper (grid-rows = smooth, no layout jank) ── */
.gt-controls-wrap {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.24s ease, opacity 0.2s ease;
  opacity: 1;
}
.gt-controls-wrap.p2p-ctrl-collapsed {
  grid-template-rows: 0fr;
  opacity: 0;
}
/* row1 (Buy/Sell + icon buttons) to row2 (coin + amount) gap measured as
   20px on bitget.com/p2p-trade 2026-09-06. */
.gt-controls { display: flex; flex-direction: column; gap: 20px; margin-bottom: 0.5rem; min-height: 0; overflow: hidden; }
.gt-controls-row1 { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
/* Bitget filter bar: Buy|Sell = segmented control, track #252629 r8 h40,
   active segment #070808; control fills #1b1c1e r8. */
.gt-side-tabs { display: flex; gap: 0; background: #252629; border-radius: 8px; padding: 3px; height: 40px; }
/* re-measured on bitget.com/p2p-trade 2026-09-06: the inactive tab text is
   rgb(234,234,237) — near-white, not the dim #8e8e92 muted tone — and the
   active pill background is rgb(56,57,61), a mid-gray, not near-black.
   Active/inactive label padding is 11px 24px (rendered ~71px wide), not
   0 18px. */
.gt-side-tab { min-height: 36px; padding: 0 24px; border: none; border-radius: 6px; background: transparent; color: #eaeaed; font-size: 14px; font-weight: 500; cursor: pointer; font-family: 'Pulse', 'Manrope', sans-serif; transition: color 0.15s, background 0.15s; }
.gt-side-tab.active { color: #f4f5f7; background: #38393d; }
.gt-side-tab[data-side="sell"].active { color: #f4f5f7; }
/* bitget's two row1 icon buttons (filter + alerts) are 38x38, radius 12px,
   bg rgb(37,38,41), 8px apart — not 40x40/radius 8/#1b1c1e/0.45rem gap. */
.gt-controls-right { display: flex; align-items: center; gap: 8px; }
.gt-icon-btn { position: relative; width: 38px; height: 38px; border-radius: 12px; border: none; background: #252629; color: #f4f5f7; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; -webkit-tap-highlight-color: transparent; }
/* filter button's notification dot: 6px circle, rgb(3,170,199), 6px from
   the top/right corner. */
.gt-icon-badge { position: absolute; top: 6px; right: 6px; width: 6px; height: 6px; border-radius: 50%; background: #03aac7; }
.gt-controls-row2 { display: flex; gap: 0.5rem; }
.gt-asset-wrap { display: flex; align-items: center; gap: 0.4rem; background: transparent; border: 1px solid #38393d; border-radius: 8px; padding: 0 0.75rem; height: 40px; flex-shrink: 0; }
.gt-asset-select { background: transparent; border: none; color: #f4f5f7; font-size: 14px; font-weight: 400; outline: none; cursor: pointer; -webkit-appearance: none; font-family: 'Pulse', 'Manrope', sans-serif; }
.gt-asset-select option { background: #111; }
.gt-amount-wrap { flex: 1; min-width: 0; display: flex; align-items: center; background: #070808; border: 1px solid #38393d; border-radius: 8px; padding: 0 0.75rem; height: 40px; gap: 0.5rem; }
.gt-amount-input { flex: 1; background: transparent; border: none; color: #f4f5f7; font-size: 14px; outline: none; min-width: 0; font-family: 'Pulse','Manrope', sans-serif; }
#orderAmount, #orderPrice, #orderAssetAmount, #orderFee {
  font-family: 'Pulse', 'Manrope', -apple-system, sans-serif;
  font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1, 'lnum' 1;
}
/* bitget's amount-input placeholder is rgb(87,88,92), notably dimmer than
   the #8e8e92 used elsewhere. */
.gt-amount-input::placeholder { color: #57585c; }
/* Single currency control for the amount box (bitget has no separate
   currency picker next to Buy/Sell — only this one, inside the amount
   box: a flag icon + code + caret-down, opening a real select). */
.gt-amount-right { position: relative; display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.gt-amount-cur-flag { width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.gt-amount-cur { font-size: 13px; font-weight: 500; color: #f4f5f7; pointer-events: none; }
.gt-amount-cur-caret { pointer-events: none; flex-shrink: 0; color: #f4f5f7; }
.gt-amount-currency-select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: none; background: transparent; cursor: pointer; -webkit-appearance: none; appearance: none; }
.gt-amount-currency-select option { background: #111; color: #fff; }
/* ===== END GATE.IO CONTROLS ===== */

.p2p-merchant-btn {
  height: 38px;
  padding: 0 1.1rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: transparent;
  color: var(--p2p-text);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Pulse', 'Manrope', sans-serif;
  transition: border-color 0.2s;
}

.p2p-merchant-btn:hover { border-color: rgba(255, 255, 255, 0.35); }

.p2p-logout-btn {
  height: 38px;
  padding: 0 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 95, 130, 0.3);
  background: transparent;
  color: var(--p2p-red);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Pulse', 'Manrope', sans-serif;
  transition: background 0.2s;
}

.p2p-logout-btn:hover { background: rgba(255, 95, 130, 0.08); }

/* ── Filter bar ── */
.p2p-filter-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.p2p-filter-chip {
  display: flex;
  align-items: center;
  gap: 0;
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  overflow: hidden;
  height: 40px;
}

.p2p-chip-icon {
  padding: 0 0.6rem;
  font-size: 0.9rem;
  color: var(--p2p-muted);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  line-height: 40px;
}

.p2p-chip-usdt { color: #26a17b; }
.p2p-chip-fiat { color: #888; }

.p2p-filter-chip select {
  height: 40px;
  background: transparent;
  border: none;
  color: var(--p2p-text);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0 0.6rem 0 0.5rem;
  outline: none;
  cursor: pointer;
  font-family: 'Pulse', 'Manrope', sans-serif;
  appearance: auto;
}

.p2p-filter-chip select option { background: #111; }

.p2p-filter-amount {
  display: flex;
  align-items: center;
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  height: 40px;
  padding: 0 0.75rem;
  gap: 0.4rem;
}

.p2p-filter-amount input {
  background: transparent;
  border: none;
  color: var(--p2p-text);
  font-size: 0.85rem;
  font-family: 'Pulse', 'Manrope', sans-serif;
  outline: none;
  width: 100px;
}

.p2p-filter-amount input::placeholder { color: var(--p2p-muted); }

.p2p-filter-amount-unit {
  color: var(--p2p-muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.p2p-filter-payment select {
  appearance: auto;
}

.p2p-filter-btn,
.p2p-refresh-btn {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #111;
  color: var(--p2p-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  flex-shrink: 0;
}

.p2p-filter-btn:hover,
.p2p-refresh-btn:hover {
  color: var(--p2p-text);
  border-color: rgba(255, 255, 255, 0.25);
}

/* ── Alert bar ── */
.p2p-alert-bar {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  background: rgba(247, 167, 35, 0.08);
  border: 1px solid rgba(247, 167, 35, 0.2);
  border-radius: 8px;
  padding: 0.55rem 0.8rem;
  margin-bottom: 0.3rem;
}

.p2p-alert-bar svg { flex-shrink: 0; margin-top: 1px; }

.p2p-alert-bar span {
  font-size: 0.8rem;
  color: #d9a84e;
  line-height: 1.5;
}

/* ── Table ── */
.p2p-table-wrap {
  border-radius: 12px;
  overflow: hidden;
  background: #0a0c10;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.p2p-table {
  width: 100%;
  border-collapse: collapse;
  background: #0a0c10;
  font-size: 0.9rem;
}

.p2p-table thead {
  background: #0a0c10;
}

.p2p-table thead th {
  background: #0a0c10;
  color: var(--p2p-muted);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.75rem 1.2rem;
  text-align: left;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  white-space: nowrap;
}

.p2p-table tbody tr {
  background: #0a0c10;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.15s;
}

.p2p-table tbody tr:last-child { border-bottom: none; }
.p2p-table tbody tr:hover { background: #0a0c10; }

.p2p-table tbody td {
  background: transparent;
  padding: 1rem 1.2rem;
  vertical-align: middle;
  border: none;
  color: var(--p2p-text);
}

.p2p-table-meta {
  text-align: center;
  padding: 1.5rem;
  color: var(--p2p-muted);
  font-size: 0.85rem;
  margin: 0;
  background: #0a0c10;
}

/* Table user cell (JS-generated) */
.table-user-cell {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.table-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f2a434, #e06c20);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.verification-badge {
  font-size: 0.7rem;
  color: var(--p2p-green);
  margin-left: 2px;
}

.verification-badge.muted { color: var(--p2p-muted); }

.payment-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.table-action-cell { text-align: right; }

/* top-pick highlight */
.top-pick-row { background: rgba(139, 243, 0, 0.02) !important; }

/* JS-injected table cell classes */
.p2p-price {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--p2p-green);
  margin: 0;
  white-space: nowrap;
}

.adv-name {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--p2p-text);
}

.adv-meta,
.cell-sub {
  margin: 0.15rem 0 0;
  color: var(--p2p-muted);
  font-size: 0.78rem;
}

.cell-main {
  margin: 0;
  font-weight: 400;
  font-size: 0.88rem;
}

.pay-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0.1rem 0.15rem 0.1rem 0;
  min-height: 24px;
  padding: 0 0.5rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #c8d4e8;
  font-size: 0.73rem;
}

.top-pick-label {
  margin: 0 0 0.25rem;
  color: var(--p2p-accent);
  font-size: 0.72rem;
  font-weight: 700;
}

.empty-row { color: var(--p2p-muted); }

.offer-action-btn {
  min-height: 36px;
  border-radius: 999px;
  border: 0;
  padding: 0 1.1rem;
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  font-family: 'Pulse', 'Manrope', sans-serif;
  transition: opacity 0.15s, transform 0.1s ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.offer-action-btn:hover  { opacity: 0.88; }
.offer-action-btn:active { transform: scale(0.93); opacity: 0.75; }
.offer-action-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.buy-offer-btn {
  background: var(--p2p-green);
  color: #061309;
}

.sell-offer-btn {
  background: var(--p2p-red);
  color: #fff;
}

/* Mobile cards */
.p2p-cards {
  display: flex;
  flex-direction: column;
  margin-top: 0;
  background: #0a0c10;
}

/* ===== GATE.IO CLONE CARDS ===== */
/* ===== Bitget P2P offer card — measured on bitget.com/p2p-trade 2026-09-04 =====
   card: transparent on #070808 page, 16px vertical padding, .5px hairline between
   cards (#1e1f22); merchant name 16/600 #f4f5f7; stats 12/400 #8e8e92 with 1x12px
   #2a2b2e "|" dividers; price 16/600 #f4f5f7 incl. fiat code; labels/values 13-14px;
   payment text 12px #8e8e92; button r8 padding 8px 12px ~60x32 14/500 #fff. */
/* ── Bitget P2P offer card — re-measured on bitget.com/es-ES/p2p-trade mobile
   (390x844, .hall-list-phone-item) 2026-09-05: NO divider border between cards —
   the real card has border-bottom:0, cards separated purely by generous vertical
   padding (~20px each side on the row wrapper). Button is bottom-right flush
   (align-items:flex-end), not centered against Amount/Limit. ── */
.gt-card {
  position: relative;
  display: block;
  /* bitget's .hall-list-item-wrap card is fully transparent — it's the page
     background (#070808, see body.p2p-page) showing through, not a distinct
     card fill. Padding alone separates cards: the row wrapper itself has
     20px 12px, but the actual mobile content block (.hall-list-phone-item)
     nests an *additional* 8px top padding inside that — re-measured
     2026-09-05 via getComputedStyle, so true top padding is 20+8=28px. */
  background: transparent;
  border-bottom: none;
  padding: 28px 12px 20px;
  margin: 0;
}
/* app-style numerals: the Bitegit app's Pulse face, tight + tabular */
.gt-num {
  font-family: 'Pulse', 'Manrope', -apple-system, sans-serif;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1, 'lnum' 1;
  letter-spacing: -0.01em;
}

.gt-head { display: flex; align-items: center; gap: 8px; }
.gt-av {
  position: relative;
  width: 16px; height: 16px; flex-shrink: 0;
  border-radius: 4px;              /* Bitget: rounded square, not circle */
  display: inline-flex; align-items: center; justify-content: center;
  background: #252629; color: #f4f5f7;
  font-size: 12px; font-weight: 600;
}
/* small green "online" status dot, bottom-right corner, overlapping the avatar
   (matches bitget.com/p2p-trade reference screenshot 2026-09-05) */
.gt-av::after {
  content: '';
  position: absolute;
  right: -2px;
  bottom: -2px;
  /* measured on the real mobile card 2026-09-05: 8x8, cyan #03aac7 (not
     green), 1px border in the page's near-black #151517 — not 6x6/#26c99b/
     1.5px-black as previously guessed. */
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #03aac7;
  border: 1px solid #151517;
  box-sizing: content-box;
}
.gt-head-body { min-width: 0; flex: 1; }
.gt-user-row { display: flex; align-items: center; gap: 5px; }
.gt-username {
  /* real: 14px/500 (not 600) */
  font-size: 14px; font-weight: 500; color: #f4f5f7; letter-spacing: -0.1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px;
}
.gt-user-row svg { flex-shrink: 0; }

.gt-stats {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 2px 10px;
  font-size: 12px; font-weight: 400; color: #8e8e92; line-height: 17px;
  /* real: 2px, not 4px */
  margin-top: 2px;
}
/* real underline is a solid #8e8e92 (matches the text color), not a
   translucent white */
.gt-time { display: inline-flex; align-items: center; gap: 2px; text-decoration: underline dotted #8e8e92; text-underline-offset: 3px; }
.gt-time svg { opacity: 1; }

/* legacy bits kept harmless */
.gt-div, .gt-online { display: none; }

.gt-price {
  font-size: 16px; font-weight: 600; color: #f4f5f7;
  /* real: the price sits 16px below the stats line and has no bottom
     margin of its own — the 10px gap to the Amount row below comes from
     .gt-row's own margin-top (see .gt-price + .gt-row). Re-measured
     2026-09-06: line-height is 16px (1.0), not 1.25/20px. */
  margin: 16px 0 0; line-height: 16px;
}
/* real price string is a single un-split span, both parts the same 600
   weight — no extra bolding on the number half */
.gt-price .gt-cur { font-size: 16px; font-weight: 600; color: #f4f5f7; margin-left: 4px; letter-spacing: 0; }

.gt-row { display: flex; gap: 8px; font-size: 14px; line-height: 20px; }
.gt-price + .gt-row { margin-top: 10px; }
.gt-row + .gt-row { margin-top: 4px; }
.gt-lbl { color: #8e8e92; flex: 0 0 54px; }
.gt-val { color: #f4f5f7; font-weight: 400; }

.gt-pays { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 4px; padding-right: 90px; }
/* re-measured on bitget.com/p2p-trade 2026-09-06: payment-method labels are
   14px, line-height 22px, and full-brightness #f4f5f7 — not 12px/muted-gray
   like the "Successful orders" stat line above them. */
.gt-pay { display: inline-flex; align-items: center; gap: 3px; font-size: 14px; color: #f4f5f7; line-height: 22px; }
.gt-pay i { width: 4px; height: 4px; border-radius: 0; flex-shrink: 0; display: inline-block; }

/* right-side pill — bottom-right flush with the card's own padding box
   (real: flex row, align-items:flex-end — button's bottom edge sits flush
   with the text column's bottom edge, i.e. the card's own bottom padding) */
.gt-btn {
  position: absolute; right: 12px; bottom: 20px;
  min-width: 60px; height: 32px; min-height: 32px;
  display: flex; align-items: center; justify-content: center;
  border: none; border-radius: 8px;
  background: #26c99b; color: #fff;
  font-size: 14px; font-weight: 500;
  padding: 8px 12px;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  font-family: 'Pulse', 'Manrope', sans-serif;
  transition: opacity 0.12s;
}
.gt-btn-sell { background: #ff3377; }
.gt-btn:active  { opacity: 0.8; }
.gt-btn:disabled { opacity: 0.4; cursor: default; }

/* ===== Bitget-matched .trader-card (rendered by p2p-live.js) ===== */
.trader-card, .sell-trader-card {
  background: transparent;
  border-bottom: 0.5px solid #1e1f22;
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.trader-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.trader-info { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.trader-avatar {
  width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff; background: #1da2b4;
}
.trader-name { display: flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 600; color: #f4f5f7; }
.trader-online-dot { width: 8px; height: 8px; border-radius: 50%; background: #00b8d4; border: 1px solid #151517; flex-shrink: 0; }
.trader-stats { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 12px; font-weight: 400; color: #8e8e92; line-height: 17px; margin-top: 3px; }
.trader-div { width: 1px; height: 12px; background: #2a2b2e; display: inline-block; }
.trader-time { display: flex; align-items: center; gap: 4px; font-size: 12px; color: #8e8e92; flex-shrink: 0; }
.trader-time svg, .listing-time-icon svg { width: 12px; height: 12px; stroke: #8e8e92; fill: none; }
.trader-price { font-size: 16px; font-weight: 600; color: #f4f5f7; }
.trader-price span { font-size: 12px; font-weight: 400; color: #8e8e92; margin-right: 4px; }
.trader-details, .trader-limits { font-size: 13px; color: #8e8e92; }
.trader-details { color: #f4f5f7; }
.trader-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 2px; }
.payment-method { display: flex; flex-wrap: wrap; gap: 10px; min-width: 0; }
.listing-payment-inline { font-size: 12px; color: #8e8e92; padding-left: 8px; border-left: 2px solid #00b8d4; line-height: 1.3; }
.btn-buy-card, .btn-sell-card {
  min-width: 60px; height: 32px; border: none; border-radius: 8px;
  background: #00b8d4; color: #fff; font-size: 14px; font-weight: 500;
  padding: 8px 12px; cursor: pointer; font-family: 'Pulse', 'Manrope', sans-serif; flex-shrink: 0;
}
.btn-sell-card { background: #ff3377; }
.trader-card .top-pick-badge, .sell-trader-card .top-pick-badge {
  font-size: 11px; font-weight: 600; color: #00b8d4; margin-bottom: 2px;
}

.p2p-offer-card,
.p2p-live-order-card {
  border: 1px solid var(--p2p-line);
  border-radius: 12px;
  background: #0a0c10;
  padding: 0.85rem;
  display: grid;
  gap: 0.45rem;
}

.p2p-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.p2p-card-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
}

.p2p-card-meta {
  margin: 0;
  color: var(--p2p-muted);
  font-size: 0.78rem;
}

.p2p-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
}

.p2p-card-grid p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--p2p-muted);
}

.p2p-card-grid strong {
  display: block;
  margin-top: 0.1rem;
  color: var(--p2p-text);
  font-size: 0.88rem;
}

.p2p-card-actions { margin-top: 0.2rem; }
.p2p-card-actions button { width: 100%; }

/* Status pills */
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.status-created, .status-open {
  background: rgba(241, 165, 65, 0.18);
  color: #ffbd66;
}

.status-paid {
  background: rgba(66, 171, 255, 0.18);
  color: #8fd3ff;
}

.status-released {
  background: rgba(25, 210, 127, 0.18);
  color: #6bebb4;
}

.status-cancelled,
.status-expired {
  background: rgba(255, 95, 130, 0.18);
  color: #ff9baf;
}

/* ── Ongoing Orders / Post Ad / Profile — hidden from main view ── */
.p2p-orders-section,
.p2p-ads-panel,
.p2p-profile-panel {
  display: none !important;
}

.p2p-orders-section {
  margin-bottom: 2rem;
}

.p2p-orders-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.p2p-orders-head h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.p2p-orders-head p {
  margin: 0;
  color: var(--p2p-muted);
  font-size: 0.82rem;
}

.mobile-orders-list {
  display: grid;
  gap: 0.5rem;
}

.mobile-order-card {
  border: 1px solid var(--p2p-line);
  border-radius: 10px;
  background: #0a0c10;
  padding: 0.65rem;
  display: grid;
  gap: 0.35rem;
}

.mobile-order-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.mobile-order-ref {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
}

.mobile-order-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.28rem 0.4rem;
}

.mobile-order-grid p {
  margin: 0;
  color: var(--p2p-muted);
  font-size: 0.73rem;
}

.mobile-order-grid strong {
  display: block;
  color: var(--p2p-text);
  font-size: 0.84rem;
  margin-top: 0.06rem;
}

.mobile-order-actions {
  margin-top: 0.2rem;
  display: flex;
  justify-content: flex-end;
}

/* ── Panels (Post Ad, Profile) ── */
.p2p-panel {
  background: #0a0c10;
  border: 1px solid var(--p2p-line);
  border-radius: 14px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.p2p-panel-head {
  margin-bottom: 1.25rem;
}

.p2p-panel-head h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.p2p-panel-head p {
  margin: 0.3rem 0 0;
  color: var(--p2p-muted);
  font-size: 0.82rem;
}

/* Ad form */
.p2p-ad-form {
  display: grid;
  gap: 0.75rem;
}

.p2p-ad-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.p2p-ad-grid label,
.p2p-ad-full {
  display: grid;
  gap: 0.25rem;
}

.p2p-ad-grid label span,
.p2p-ad-full span {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--p2p-muted);
}

.p2p-ad-grid input,
.p2p-ad-grid select,
.p2p-ad-full input {
  width: 100%;
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0a0c10;
  color: var(--p2p-text);
  padding: 0 0.75rem;
  font-size: 0.85rem;
  font-family: 'Pulse', 'Manrope', sans-serif;
  outline: none;
  transition: border-color 0.2s;
}

.p2p-ad-grid input:focus,
.p2p-ad-grid select:focus,
.p2p-ad-full input:focus {
  border-color: rgba(139, 243, 0, 0.4);
}

.p2p-ad-grid select option { background: #0a0c10; }

.p2p-ad-submit {
  justify-self: start;
  min-height: 40px;
  padding: 0 1.5rem;
  border-radius: 999px;
  border: none;
  background: linear-gradient(95deg, var(--p2p-green), #36da96);
  color: #071309;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  font-family: 'Pulse', 'Manrope', sans-serif;
  transition: opacity 0.2s;
}

.p2p-ad-submit:hover { opacity: 0.85; }

/* keep old class used in older JS injection */
.ad-create-btn {
  min-height: 40px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(95deg, var(--p2p-green), #36da96);
  color: #071309;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
}

.p2p-ad-meta {
  margin: 0;
  font-size: 0.78rem;
  color: var(--p2p-muted);
}

.p2p-ad-meta.error { color: var(--p2p-red); }
.p2p-ad-meta.success { color: var(--p2p-green); }

.ad-create-meta { margin: 0; font-size: 0.78rem; color: var(--p2p-muted); }
.ad-create-meta.error { color: var(--p2p-red); }
.ad-create-meta.success { color: var(--p2p-green); }

.p2p-myads-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 1.25rem 0 0.6rem;
}

.p2p-myads-head h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
}

.p2p-sec-btn,
.secondary-btn {
  min-height: 34px;
  padding: 0 0.9rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: var(--p2p-text);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Pulse', 'Manrope', sans-serif;
  transition: border-color 0.2s;
}

.p2p-sec-btn:hover,
.secondary-btn:hover { border-color: rgba(255, 255, 255, 0.28); }

.p2p-myads-list,
.my-ads-list {
  display: grid;
  gap: 0.5rem;
}

.my-ad-card {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  background: #111;
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.7rem;
}
.my-ad-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.2rem; }
.my-ad-type { font-size: 0.7rem; font-weight: 700; padding: 2px 8px; border-radius: 4px; margin-right: 0.4rem; }
.ad-buy { background: rgba(0,184,212,0.15); color: #00b8d4; }
.ad-sell { background: rgba(246,70,93,0.15); color: #f6465d; }
.my-ad-asset { font-size: 0.85rem; font-weight: 700; color: #fff; }
.my-ad-status { font-size: 0.72rem; font-weight: 600; padding: 2px 8px; border-radius: 20px; }
.my-ad-status.active { background: rgba(0,184,212,0.12); color: #00b8d4; }
.my-ad-status.paused { background: rgba(168,255,62,0.12); color: #00b8d4; }
.my-ad-price { font-size: 1.1rem; font-weight: 800; color: #fff; margin: 0.1rem 0; }
.my-ad-cur { font-size: 0.75rem; color: #6b7690; font-weight: 500; }
.my-ad-row { display: flex; justify-content: space-between; font-size: 0.76rem; color: #8a97ae; }
.my-ad-row span:last-child { color: #d0d5e0; font-weight: 500; }
.my-ad-actions { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
.my-ad-btn { flex: 1; height: 30px; border: none; border-radius: 6px; font-size: 0.75rem; font-weight: 700; cursor: pointer; font-family: 'Pulse', 'Manrope', sans-serif; -webkit-tap-highlight-color: transparent; }
.my-ad-edit { background: rgba(0,184,212,0.15); color: #00b8d4; }
.my-ad-pause { background: rgba(168,255,62,0.12); color: #00b8d4; }
.my-ad-delete { background: rgba(246,70,93,0.12); color: #f6465d; }

/* Edit Ad Modal */
.edit-ad-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.72); z-index: 9000;
  opacity: 0; transition: opacity 0.22s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
}
.edit-ad-modal-overlay.ead-visible { opacity: 1; }
.edit-ad-modal {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: #0a0c10; border-radius: 20px 20px 0 0;
  padding-bottom: env(safe-area-inset-bottom, 0);
  max-height: 90vh; overflow-y: auto; overflow-x: hidden;
  transform: translateY(100%); transition: transform 0.26s cubic-bezier(0.32,0.72,0,1);
  will-change: transform; touch-action: pan-y;
  overscroll-behavior: contain;
}
.edit-ad-modal-overlay.ead-visible .edit-ad-modal { transform: translateY(0); }
.edit-ad-head { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1rem 0.5rem; border-bottom: 1px solid rgba(255,255,255,0.07); }
.edit-ad-head h3 { font-size: 0.95rem; font-weight: 700; color: #fff; margin: 0; }
.edit-ad-close {
  background: none; border: none; color: #8a97ae; font-size: 1.2rem;
  cursor: pointer; padding: 6px 8px; border-radius: 6px;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  transition: color 0.15s;
}
.edit-ad-close:active { color: #fff; }
.edit-ad-body { padding: 0.8rem 1rem; display: flex; flex-direction: column; gap: 0.65rem; }
.edit-ad-label { font-size: 0.72rem; color: #00b8d4; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.edit-ad-input {
  background: #1a1a1a; border: 1px solid rgba(255,255,255,0.1); border-radius: 8px;
  color: #fff; font-size: 16px; padding: 0.6rem 0.8rem;
  font-family: 'Pulse', 'Manrope', sans-serif; outline: none; width: 100%; box-sizing: border-box;
  transition: border-color 0.15s; -webkit-appearance: none;
}
.edit-ad-input:focus { border-color: #00b8d4; }

.my-ad-card p { margin: 0; color: var(--p2p-muted); font-size: 0.78rem; }
.my-ad-card strong { color: var(--p2p-text); }

/* Profile */
.p2p-profile-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.p2p-profile-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #f2a434;
  color: #1f1406;
  font-size: 1.1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.p2p-profile-avatar.has-image,
.mob-profile-avatar.has-image {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: transparent;
  text-indent: -9999px;
  overflow: hidden;
}

/* old JS-used class alias */
.profile-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #f2a434;
  color: #1f1406;
  font-size: 1rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.p2p-profile-info {
  flex: 1;
  min-width: 0;
}

.p2p-profile-info h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.p2p-profile-info p {
  margin: 0.2rem 0 0;
  color: var(--p2p-muted);
  font-size: 0.8rem;
}

.p2p-identity-tag,
.profile-identity-tag {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  border-radius: 999px;
  border: 1px solid rgba(150, 170, 210, 0.28);
  background: rgba(60, 80, 120, 0.2);
  color: #c5d3ea;
  font-size: 0.66rem;
  font-weight: 700;
  padding: 0 0.48rem;
  margin-top: 0.3rem;
}

.p2p-identity-tag.verified,
.profile-identity-tag.verified {
  border-color: rgba(139, 243, 0, 0.4);
  background: rgba(57, 93, 34, 0.3);
  color: #b8f770;
}

.p2p-deposit-btn,
.profile-deposit-btn {
  min-height: 32px;
  padding: 0 0.9rem;
  border-radius: 999px;
  border: none;
  background: linear-gradient(96deg, #f5b34a, #f19f2f);
  color: #1f1406;
  font-size: 0.73rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  font-family: 'Pulse', 'Manrope', sans-serif;
  margin-left: auto;
}

.p2p-metrics-grid,
.profile-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.p2p-metrics-grid article,
.profile-metrics-grid article {
  border: 1px solid var(--p2p-line);
  border-radius: 10px;
  background: #0a0c10;
  padding: 0.55rem 0.65rem;
  display: grid;
  gap: 0.12rem;
}

.p2p-metrics-grid article span,
.profile-metrics-grid article span {
  color: var(--p2p-muted);
  font-size: 0.65rem;
  line-height: 1.2;
}

.p2p-metrics-grid article strong,
.profile-metrics-grid article strong {
  color: var(--p2p-text);
  font-size: 0.85rem;
  font-weight: 700;
}

.p2p-profile-meta,
.profile-meta {
  margin: 0;
  color: var(--p2p-muted);
  font-size: 0.72rem;
}

.p2p-deposit-line,
.profile-deposit-line {
  margin: 0.45rem 0 0;
  color: var(--p2p-muted);
  font-size: 0.73rem;
}

.p2p-deposit-line strong,
.profile-deposit-line strong {
  color: var(--p2p-text);
  font-size: 0.85rem;
}

/* user-status from JS */
.user-status { margin: 0; color: var(--p2p-muted); font-size: 0.85rem; }
.user-online { color: var(--p2p-green); }
.user-error { color: var(--p2p-red); }

/* Misc buttons JS injects */
.filter-btn,
.danger-btn,
#joinByRefBtn,
#markPaidBtn,
#releaseBtn,
#cancelOrderBtn {
  min-height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #111;
  color: var(--p2p-text);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0 0.7rem;
  cursor: pointer;
  font-family: 'Pulse', 'Manrope', sans-serif;
  transition: transform 0.1s ease, opacity 0.12s, background 0.15s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

#markPaidBtn:active,
#cancelOrderBtn:active,
#joinByRefBtn:active { transform: scale(0.96); opacity: 0.8; }
#markPaidBtn:disabled,
#cancelOrderBtn:disabled { opacity: 0.4; cursor: default; transform: none; }

/* Release mode — seller releasing crypto: gold/green highlight like Bybit */
#markPaidBtn.release-mode {
  background: linear-gradient(96deg, #00b8d4, #00b8d4);
  color: #fff;
  border-color: transparent;
  font-weight: 700;
  box-shadow: 0 2px 12px rgba(240,185,11,0.35);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
#markPaidBtn.release-mode:active { transform: scale(0.95); }

#cancelOrderBtn, .danger-btn {
  background: rgba(255, 95, 130, 0.12);
  border-color: rgba(255, 95, 130, 0.35);
  color: #ff9ba8;
}
#cancelOrderBtn:not(:disabled):active { transform: scale(0.96); }

.badge {
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(247, 167, 35, 0.22);
  color: var(--p2p-accent);
  font-size: 0.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Exchange ticker (hidden legacy) */
.exchange-ticker {
  display: none;
}

/* Asset chip row (hidden legacy) */
.asset-chip-row,
.asset-chip {
  display: none;
}

/* ══ Modals ══ */
.deal-modal,
.p2p-auth-modal,
.p2p-kyc-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  padding: 0.8rem;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,0.96);
}
/* order-modal is now full-screen Binance style — flex column */
.order-modal {
  position: fixed;
  inset: 0;
  z-index: 610;
  display: flex;
  flex-direction: column;
  background: #0a0c10;
  font-family: 'Pulse', 'Manrope', sans-serif;
  overflow: hidden;
}

.deal-backdrop,
.p2p-auth-backdrop,
.p2p-kyc-backdrop,
.order-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.96);
  z-index: -1;
}

.deal-panel,
.p2p-auth-panel,
.p2p-kyc-panel,
.order-panel {
  position: relative;
  width: min(980px, 100%);
  max-height: 90vh;
  overflow: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: #0a0c10;
  box-shadow: var(--p2p-shadow);
}

.deal-panel {
  display: grid;
  grid-template-columns: 1fr;
}

.deal-left,
.deal-right,
.p2p-auth-panel,
.p2p-kyc-panel,
.order-panel {
  padding: 1rem;
}

.deal-profile {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.deal-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #f6d89b;
  color: #4f3f20;
  font-size: 1.2rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.deal-profile h3,
.deal-profile p,
.deal-price-row span,
.deal-price-row strong,
.deal-price-row small,
.deal-terms,
.deal-hint { margin: 0; min-height: 1.2em; }

.deal-profile p, .deal-time, .deal-terms, .deal-hint {
  color: var(--p2p-muted);
  font-size: 0.84rem;
}

.deal-verify {
  margin-top: 0.65rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.deal-verify span {
  min-height: 24px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  padding: 0 0.55rem;
  display: inline-flex;
  align-items: center;
  color: #8ff3bb;
  font-size: 0.74rem;
}

.deal-meta-list {
  margin: 0.75rem 0 0;
  display: grid;
  gap: 0.45rem;
}

.deal-meta-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.deal-meta-list dt { color: var(--p2p-muted); font-size: 0.83rem; }
.deal-meta-list dd { margin: 0; font-weight: 700; }

.deal-price-row {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
}

.deal-price-row strong {
  font-size: 1.5rem;
  color: var(--p2p-green);
}

.deal-field {
  margin-top: 0.55rem;
  display: grid;
  gap: 0.26rem;
}

.deal-field span { color: var(--p2p-muted); font-size: 0.82rem; }

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

.deal-input-wrap b {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--p2p-muted);
  font-size: 0.8rem;
}

.deal-input-wrap input { padding-right: 3rem !important; }

.deal-actions {
  margin-top: 0.8rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.deal-confirm-btn,
.deal-cancel-btn,
#loginBtn,
#closeAuthBtn,
#chatForm button {
  min-height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Pulse', 'Manrope', sans-serif;
}

.deal-confirm-btn,
#loginBtn,
#chatForm button,
#markPaidBtn {
  background: var(--p2p-accent);
  border-color: transparent;
  color: #201500;
}

.deal-confirm-btn.is-sell {
  background: var(--p2p-red);
  color: #fff;
}

.deal-cancel-btn,
#closeAuthBtn,
#releaseBtn {
  background: transparent;
  color: var(--p2p-text);
}

.deal-hint.success { color: var(--p2p-green); }
.deal-hint.error { color: var(--p2p-red); }

/* Modal inputs */
.p2p-filter-row input,
.p2p-filter-row select,
.p2p-live-controls input,
#emailInput,
#passwordInput,
#chatInput,
#dealPayAmount,
#dealReceiveAmount,
#dealPaymentSelect {
  width: 100%;
  min-height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #111;
  color: var(--p2p-text);
  padding: 0 0.75rem;
  font-size: 0.9rem;
  font-family: 'Pulse', 'Manrope', sans-serif;
  outline: none;
}

.p2p-filter-row input:focus,
.p2p-filter-row select:focus,
#emailInput:focus,
#passwordInput:focus,
#dealPayAmount:focus,
#dealReceiveAmount:focus,
#dealPaymentSelect:focus {
  border-color: rgba(139, 243, 0, 0.4);
}

.p2p-auth-panel {
  width: min(420px, 100%);
  display: grid;
  gap: 0.55rem;
}

.p2p-auth-panel h3, .p2p-auth-panel p { margin: 0; }
.p2p-auth-panel p { color: var(--p2p-muted); font-size: 0.85rem; }

.p2p-auth-actions {
  margin-top: 0.25rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.p2p-kyc-panel {
  width: min(560px, 100%);
  display: grid;
  gap: 0.75rem;
}

.p2p-kyc-modal { z-index: 2100; }

.p2p-kyc-head {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  align-items: flex-start;
}

.p2p-kyc-head h3, .p2p-kyc-head p { margin: 0; }
.p2p-kyc-head h3 { font-size: 1.1rem; }
.p2p-kyc-head p { margin-top: 0.2rem; color: var(--p2p-muted); font-size: 0.84rem; }

.p2p-kyc-form { display: grid; gap: 0.65rem; }

.p2p-kyc-field { display: grid; gap: 0.26rem; }
.p2p-kyc-field span { color: var(--p2p-muted); font-size: 0.82rem; }

.p2p-kyc-select {
  width: 100%;
  min-height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1);
  background: #111;
  color: var(--p2p-text);
  padding: 0 0.75rem;
  font-size: 0.9rem;
  font-family: 'Pulse', 'Manrope', sans-serif;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  outline: none;
}
.p2p-kyc-select:focus { border-color: #00b8d4; }
.p2p-kyc-select option { background: #111; color: #e2e8f0; }

.p2p-kyc-field input[type='text'],
.p2p-kyc-field input[type='file'] {
  width: 100%;
  min-height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #111;
  color: var(--p2p-text);
  padding: 0 0.75rem;
  font-size: 0.9rem;
  font-family: 'Pulse', 'Manrope', sans-serif;
}

.p2p-kyc-field input[type='file'] { padding-top: 0.52rem; }
.p2p-kyc-field small { color: var(--p2p-muted); font-size: 0.74rem; }

.p2p-kyc-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  color: #d5deef;
  font-size: 0.82rem;
  line-height: 1.45;
}

.p2p-kyc-consent input[type='checkbox'] { margin-top: 0.18rem; }

.p2p-kyc-hint { margin: 0; color: var(--p2p-muted); font-size: 0.82rem; }
.p2p-kyc-hint.success { color: var(--p2p-green); }
.p2p-kyc-hint.error { color: var(--p2p-red); }

.p2p-kyc-actions { display: flex; justify-content: flex-end; }

#kycSubmitBtn {
  min-height: 42px;
  border-radius: 10px;
  border: none;
  background: var(--p2p-accent);
  color: #201500;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0 1.2rem;
  cursor: pointer;
  font-family: 'Pulse', 'Manrope', sans-serif;
}

#kycSubmitBtn:disabled { opacity: 0.55; cursor: not-allowed; }

/* Order modal */
.order-panel { width: min(980px, 100%); }

.order-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.order-header h2 { margin: 0; font-size: clamp(1rem, 3vw, 1.4rem); }

.order-summary-grid {
  margin-top: 0.65rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.order-summary-grid article {
  border: 1px solid var(--p2p-line);
  border-radius: 10px;
  background: #111;
  padding: 0.55rem;
}

.order-summary-grid span {
  display: block;
  color: var(--p2p-muted);
  font-size: 0.78rem;
}

.order-summary-grid strong {
  margin-top: 0.15rem;
  display: block;
  font-size: 0.9rem;
}

.order-action-row {
  margin-top: 0.7rem;
  display: grid;
  gap: 0.45rem;
}

/* Chat */
.chat-box {
  margin-top: 0.7rem;
  border: 1px solid var(--p2p-line);
  border-radius: 10px;
  background: #0a0c10;
  padding: 0.65rem;
}

.chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.chat-head p, .chat-head span { margin: 0; }
.chat-head span { color: var(--p2p-muted); font-size: 0.78rem; }

.chat-messages {
  margin-top: 0.6rem;
  max-height: 230px;
  overflow: auto;
  display: grid;
  gap: 0.4rem;
}

.chat-empty { margin: 0; color: var(--p2p-muted); font-size: 0.84rem; }

.chat-item {
  border-radius: 10px;
  border: 1px solid var(--p2p-line);
  background: #151515;
  padding: 0.5rem;
}

.chat-you {
  margin-left: auto;
  width: min(86%, 420px);
  border-color: rgba(25, 210, 127, 0.35);
}

.chat-merchant {
  margin-right: auto;
  width: min(86%, 420px);
}

.chat-system {
  width: 100%;
  background: rgba(247, 167, 35, 0.12);
}

.chat-sender, .chat-text, .chat-time { margin: 0; }
.chat-sender { font-size: 0.74rem; color: var(--p2p-muted); }
.chat-text { margin-top: 0.12rem; line-height: 1.44; font-size: 0.85rem; }
.chat-time { margin-top: 0.2rem; color: var(--p2p-muted); font-size: 0.72rem; }

.chat-form {
  margin-top: 0.6rem;
  display: grid;
  gap: 0.45rem;
}

/* Live orders section misc */
.p2p-live-controls {
  margin-top: 0.65rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
}

/* ── Mobile bottom nav ── */
/* Removed 2026-09-05: Orders/Profile/Post-Ad are now reachable from the
   header's "More" dropdown instead, so this bar (and the space + background
   it reserved at the bottom of the viewport) is gone — the offer-card list
   now runs all the way to the bottom of the page. */
.p2p-mobile-bottom-nav {
  display: none !important;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 900;
  background: rgba(10, 12, 16, 0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--p2p-line);
  display: flex;
  align-items: stretch;
  min-height: calc(62px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -12px 28px rgba(0, 0, 0, 0.35);
  will-change: transform;
  transition: transform 0.22s cubic-bezier(0.4,0,0.2,1);
  transform: translateY(0);
}
.p2p-mobile-bottom-nav.p2p-nav-hidden {
  transform: translateY(100%);
}

.p2p-mobile-bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0.6rem 0.25rem;
  text-decoration: none;
  color: var(--p2p-muted);
  font-size: 0;
  transition: color 0.15s;
}

.p2p-mobile-bottom-nav a.active { color: var(--p2p-brand); }
.p2p-mobile-bottom-nav a:hover { color: var(--p2p-text); }

.p2p-mobile-bottom-nav .nav-icon {
  font-size: 1.2rem;
  line-height: 1;
}

.p2p-mobile-bottom-nav .nav-label {
  font-size: 0.65rem;
  font-weight: 600;
  font-family: 'Pulse', 'Manrope', sans-serif;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .p2p-main-nav { display: none; }
  .p2p-hamburger { display: flex; }
  .p2p-header-actions .p2p-login-btn,
  .p2p-header-actions .p2p-signup-btn { display: none; }
}

@media (min-width: 640px) {
  .p2p-ad-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .p2p-metrics-grid,
  .profile-metrics-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .order-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  #chatForm button { min-width: 110px; }
}

@media (min-width: 860px) {
  .deal-panel {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.95fr);
  }

  .order-action-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .p2p-main-nav { display: flex; }
  .p2p-hamburger { display: none !important; }
  .p2p-nav-drawer, .p2p-nav-overlay { display: none !important; }
  .desktop-only { display: block; }
  .mobile-only { display: none; }
  .p2p-mobile-bottom-nav { display: none; }
  .p2p-side-tabs { position: static; }
}

/* ══════════════════════════════════
   GATE.IO MOBILE SCREENS
══════════════════════════════════ */

/* Mobile screens (Orders / Profile) */
.mob-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  /* Use dvh so screen height stays fixed when Android keyboard opens */
  height: 100dvh;
  height: 100vh; /* fallback for older browsers */
  width: 100%;
  background: #0a0c10;
  z-index: 1500;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: none;
  /* No bottom nav anywhere inside P2P's own screens (2026-09-06) — full
     height, only the safe-area inset needs clearing. */
  padding-bottom: env(safe-area-inset-bottom);
  display: flex;
  flex-direction: column;
  /* GPU compositing */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.mob-screen::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

body.mob-screen-open {
  overflow: hidden;
  background: #0a0c10;
}

body.mob-screen-open .p2p-board {
  display: none !important;
}

#mobOrdersScreen,
#mobProfileScreen,
#mobPostAdScreen {
  /* No bottom nav to reserve space for (2026-09-06) — full-bleed to the
     viewport edge so nothing behind the screen can peek out underneath. */
  inset: 0;
  height: auto !important;
  padding-bottom: 0;
}

/* .p2p-mobile-bottom-nav stays permanently hidden (see the base rule above) —
   it used to be force-shown while a mob-screen was open, but P2P doesn't use
   a bottom nav anywhere inside its own screens/overlays (2026-09-06). */

/* Hide main P2P header when on profile/orders screen */
body[data-mobile-tab="profile"] .p2p-header,
body[data-mobile-tab="profile"] .p2p-subnav,
body[data-mobile-tab="orders"] .p2p-header,
body[data-mobile-tab="orders"] .p2p-subnav,
body.mob-screen-open .p2p-header,
body.mob-screen-open .p2p-subnav,
body.mob-screen-open .p2p-mobile-topnav,
body.mob-screen-open .p2p-secondary-nav {
  display: none !important;
}

#mobPaymentMethodsScreen,
#mobPaymentMethodTypesScreen,
#mobPaymentMethodFormScreen {
  inset: 0;
  height: auto !important;
  padding-bottom: 0;
}

.mob-screen-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1rem 0.85rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  background: #0a0c10;
  position: sticky;
  top: 0;
  z-index: 2;
}

.mob-screen-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  flex: 1;
  text-align: center;
  color: #fff;
  letter-spacing: 0.01em;
}

.mob-back-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50%;
  color: #fff;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.mob-payment-currency {
  min-width: 38px;
  text-align: right;
  color: rgba(255,255,255,0.78);
  font-size: 0.88rem;
  font-weight: 700;
}

.mob-payment-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0 0 1rem;
  background: #0a0c10;
}

.mob-payment-picker-body {
  padding: 0;
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
  background: #0a0c10;
}

.mob-payment-form-body {
  padding: 0.95rem 1rem 1.25rem;
}

.mob-payment-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  color: rgba(255,255,255,0.38);
  padding: 1.5rem 1rem 3rem;
}

.mob-payment-empty p {
  margin: 0;
  font-size: 1.02rem;
}

.mob-payment-empty-icon {
  width: 78px;
  height: 78px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 7px;
}

.mob-payment-empty-icon span:first-child,
.mob-payment-empty-icon span:last-child {
  display: block;
  background: rgba(255,255,255,0.2);
  border-radius: 6px;
}

.mob-payment-empty-icon span:first-child {
  width: 34px;
  height: 8px;
}

.mob-payment-empty-icon span:last-child {
  width: 42px;
  height: 28px;
  clip-path: polygon(8% 0, 92% 0, 100% 16%, 100% 100%, 0 100%, 0 16%);
}

.mob-payment-methods-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 1rem;
  background: #0a0c10;
}

.mob-payment-method-card {
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.09);
  background: linear-gradient(180deg, rgba(24,26,34,0.96), rgba(13,14,19,0.98));
  box-shadow: 0 18px 34px rgba(0,0,0,0.28);
  padding: 0.95rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.mob-payment-method-card:active {
  transform: scale(0.995);
}

.mob-payment-method-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg,#00b8d4,#0288d1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  flex-shrink: 0;
}

.mob-payment-method-copy {
  min-width: 0;
  flex: 1;
}

.mob-payment-method-title {
  color: #fff;
  font-size: 0.94rem;
  font-weight: 700;
  margin: 0 0 0.18rem;
}

.mob-payment-method-subtitle {
  color: rgba(255,255,255,0.55);
  font-size: 0.76rem;
  line-height: 1.35;
  margin: 0;
  word-break: break-word;
}

.mob-payment-method-arrow {
  color: rgba(255,255,255,0.28);
  font-size: 1.35rem;
  line-height: 1;
}

.mob-payment-footer {
  padding: 0.75rem 1rem calc(1rem + env(safe-area-inset-bottom));
  background: #0a0c10;
}

.mob-payment-primary-btn {
  width: 100%;
  height: 54px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg,#3b82f6 0%, #22d3ee 100%);
  color: #fff;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: 0 12px 28px rgba(33, 170, 233, 0.24);
  font-family: 'Pulse', 'Manrope', sans-serif;
  cursor: pointer;
}

.mob-payment-primary-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.mob-payment-search-wrap {
  position: relative;
  padding: 12px 16px 10px;
  background: #0a0c10;
}

.mob-payment-search-icon {
  position: absolute;
  left: 28px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: rgba(255,255,255,0.38);
  pointer-events: none;
}

.mob-payment-search {
  width: 100%;
  height: 44px;
  border-radius: 22px;
  border: none;
  background: #1c1c1e;
  color: #fff;
  padding: 0 1rem 0 2.6rem;
  font-size: 15px;
  outline: none;
  box-sizing: border-box;
  -webkit-appearance: none;
}

.mob-payment-search::placeholder {
  color: rgba(255,255,255,0.36);
}

.mob-payment-type-list {
  display: flex;
  flex-direction: column;
  background: #0a0c10;
}

.mob-payment-type-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 0 16px;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  border-radius: 0;
  background: transparent;
  text-align: left;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.mob-payment-type-row:active { background: rgba(255,255,255,0.04); }

.mob-payment-type-chip {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  background: rgba(255,255,255,0.08);
}
.mob-payment-type-chip svg,
.mob-payment-type-svg svg { width: 40px; height: 40px; border-radius: 10px; display: block; }

.mob-payment-type-label {
  flex: 1;
  color: #fff;
  font-size: 0.97rem;
  font-weight: 400;
}

.mob-payment-type-arrow {
  color: rgba(255,255,255,0.35);
  font-size: 1.1rem;
  font-weight: 300;
}

.mob-payment-label {
  display: block;
  color: rgba(255,255,255,0.76);
  font-size: 0.84rem;
  font-weight: 700;
  margin: 0 0 0.48rem;
}

.mob-payment-label span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.16);
  color: rgba(255,255,255,0.5);
  font-size: 0.64rem;
  margin-left: 0.18rem;
}

.mob-payment-input {
  width: 100%;
  height: 48px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: #191b22;
  color: #fff;
  padding: 0 0.95rem;
  font-size: 16px;
  outline: none;
  margin-bottom: 1.2rem;
}

.mob-payment-input::placeholder {
  color: rgba(255,255,255,0.3);
}

.mob-payment-upload-row {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  margin-top: 0.2rem;
}

.mob-payment-qr-btn {
  width: 106px;
  height: 106px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  background: #1a1c23;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.mob-payment-qr-plus {
  color: rgba(255,255,255,0.48);
  font-size: 2.3rem;
  line-height: 1;
}

.mob-payment-qr-preview {
  width: 106px;
  height: 106px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: #111;
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}

.mob-payment-meta {
  min-height: 18px;
  margin: 1rem 0 0;
  color: rgba(255,255,255,0.48);
  font-size: 0.78rem;
}

.mob-payment-sheet {
  position: fixed;
  inset: 0;
  z-index: 520;
}

.mob-payment-sheet.hidden {
  display: none;
}

.mob-payment-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
}

.mob-payment-sheet-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: #121318;
  border-radius: 18px 18px 0 0;
  overflow: hidden;
  border-top: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 -16px 40px rgba(0,0,0,0.35);
}

.mob-payment-sheet-action,
.mob-payment-sheet-cancel {
  width: 100%;
  min-height: 58px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.mob-payment-sheet-panel > :first-child {
  border-top: none;
}

.mob-payment-sheet-cancel {
  color: rgba(255,255,255,0.9);
}

/* Orders tabs */
.mob-order-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  padding: 0 1rem;
}

.mob-otab {
  flex: 1;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--p2p-muted);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.75rem 0;
  cursor: pointer;
  font-family: 'Pulse', 'Manrope', sans-serif;
  transition: color 0.15s, border-color 0.15s;
}

.mob-otab.active {
  color: var(--p2p-text);
  border-bottom-color: var(--p2p-text);
}

.mob-order-subtabs {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.mob-order-subtabs::-webkit-scrollbar { display: none; }

.mob-subtab {
  height: 30px;
  padding: 0 0.85rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.1);
  background: #111;
  color: var(--p2p-muted);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  font-family: 'Pulse', 'Manrope', sans-serif;
}

.mob-subtab.active {
  background: #222;
  color: var(--p2p-text);
  border-color: rgba(255,255,255,0.25);
}

.mob-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 1rem;
  gap: 1rem;
}

.mob-empty-icon { font-size: 3rem; opacity: 0.5; }
.mob-empty-state p { color: var(--p2p-muted); font-size: 0.9rem; margin: 0; }

/* Profile screen */
.mob-profile-hero {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  background: #0a0c10;
}

.mob-profile-main {
  flex: 1;
  min-width: 0;
}

.mob-profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg,#2f68ff,#29d3e4);
  color: #fff;
  font-size: 1.4rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 10px 24px rgba(38, 142, 255, 0.18);
}

.mob-profile-name { margin: 0; font-size: 1rem; font-weight: 700; }
.mob-profile-since { margin: 0.2rem 0 0.5rem; font-size: 0.73rem; color: var(--p2p-muted); }

.mob-profile-edit-btn {
  min-width: 64px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(59,130,246,0.26);
  background: linear-gradient(135deg, rgba(59,130,246,0.16), rgba(34,211,238,0.14));
  color: #7dd3fc;
  font-size: 0.77rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  font-family: 'Pulse', 'Manrope', sans-serif;
  cursor: pointer;
}

.mob-verify-row { display: flex; flex-wrap: wrap; gap: 0.35rem; }

.mob-verify-chip {
  font-size: 0.7rem;
  color: var(--p2p-green);
  background: rgba(25, 210, 127, 0.1);
  border: 1px solid rgba(25, 210, 127, 0.25);
  border-radius: 999px;
  padding: 0.18rem 0.5rem;
  font-weight: 600;
}

.mob-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
  border-top: 1px solid rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  background: #0a0c10;
}

.mob-stats-grid > div {
  padding: 1rem;
  border-right: 1px solid rgba(255,255,255,0.07);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  background: linear-gradient(180deg, rgba(17,18,24,0.94), rgba(9,10,14,0.98));
}

.mob-stats-grid > div:nth-child(even) { border-right: none; }

.mob-stats-grid span {
  display: block;
  font-size: 0.72rem;
  color: var(--p2p-muted);
  margin-bottom: 0.3rem;
}

.mob-stats-grid strong {
  font-size: 1.1rem;
  font-weight: 700;
}

.mob-more-info {
  display: block;
  text-align: center;
  padding: 0.75rem;
  font-size: 0.82rem;
  color: var(--p2p-muted);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.mob-menu-tabs {
  display: flex;
  padding: 0 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  background: #0a0c10;
}

.mob-mtab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--p2p-muted);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.7rem 1rem;
  cursor: pointer;
  font-family: 'Pulse', 'Manrope', sans-serif;
  transition: color 0.15s, border-color 0.15s;
}

.mob-mtab.active { color: var(--p2p-text); border-bottom-color: var(--p2p-text); }

.mob-menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: #0a0c10;
}

.mob-menu-list li {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 0.9rem;
  color: var(--p2p-text);
  cursor: pointer;
  background: #0b0c10;
}

.mob-menu-list li:hover { background: rgba(255,255,255,0.03); }
.mob-arrow { margin-left: auto; color: var(--p2p-muted); font-size: 1rem; }

/* ══════════════════════════════════════
   BITGET-STYLE PROFILE (new)
   ══════════════════════════════════════ */

/* Header — no title text */
.bg-profile-head h2 { display: none; }

/* Hero row — bitget wraps the avatar/name/UID/badges block in its own
   bordered card (.p-16px.rounded-12px.border-1px.border-borderStrengthOne),
   border rgb(39,40,43), radius 12px, padding 16px, transparent fill (the
   ambient page colour shows through) — measured live 2026-09-06. Ours had
   no box at all before this pass ("jaha jaha box hai waha banao"). */
.bg-profile-hero {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  margin: 0.75rem 1rem 0;
  padding: 1rem;
  border: 1px solid #27282b;
  border-radius: 12px;
  background: transparent;
}
.bg-profile-avatar {
  /* 48x48 circle, matches bitget's real panel avatar (.micro-bit-avatar /
     .mi-avatar--circle inside .micro-userInfo), measured live 2026-09-06. */
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg,#1b4bff,#00d2d8);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.bg-profile-info { flex: 1; min-width: 0; }
.bg-name-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.22rem;
}
.bg-profile-name {
  /* bitget's .micro-userInfo-displayName measures font-weight 700 (not 800)
     and color rgb(244,245,247), not pure white — measured 2026-09-06. */
  font-size: 1rem;
  font-weight: 700;
  color: #f4f5f7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bg-edit-icon {
  background: none;
  border: none;
  color: rgba(255,255,255,0.45);
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.bg-deposit-line {
  margin: 0 0 0.4rem;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.45);
}
.bg-deposit-line strong { color: rgba(255,255,255,0.7); font-weight: 600; }
.bg-verify-row { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.bg-verify-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.7rem;
  color: #1db954;
  background: rgba(29,185,84,0.1);
  border: 1px solid rgba(29,185,84,0.25);
  border-radius: 999px;
  padding: 0.15rem 0.45rem;
  font-weight: 600;
}
/* Neutral/unverified state — used on the merchant public profile when the
   viewed trader hasn't verified that item yet (bitget shows this as a plain
   grey prompt, not a green checkmark pill). */
.bg-verify-chip.mp-unverified {
  color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
}

/* UID row */
.bg-uid-row {
  /* bitget's UID row: font-size 12px, line-height 18px, color rgb(142,142,146),
     margin-top 2px — measured live 2026-09-06. */
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 2px 0 0.4rem;
  font-size: 0.75rem;
  line-height: 18px;
  color: #8e8e92;
}
.bg-uid-copy {
  background: none;
  border: none;
  color: #8e8e92;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  padding: 1px;
}
.bg-uid-copy svg { width: 12px; height: 12px; }
.bg-uid-copy:active { color: #00d2d8; }

/* Badge row (Verified / VIP tier) — bitget measured live 2026-09-06:
   Verified = font 12px/700, color rgb(38,201,155), bg rgba(14,203,129,.12),
   radius 2px, no border, padding 0 6px 0 12px (icon occupies the left 12px).
   VIP0 = a NEUTRAL GREY pill (not amber/gold) — bg rgb(31,32,35), color
   rgb(87,88,92), same radius/padding shape, margin-left 12px from Verified. */
.bg-badge-row { display: flex; flex-wrap: wrap; gap: 0.625rem; margin-bottom: 0.45rem; }
.bg-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 18px;
  border-radius: 2px;
  padding: 0 6px 0 12px;
}
.bg-status-badge.vip { color: #57585c; background: #1f2023; }

/* Verified badge — bitget's real icon is a 22x22 filled scalloped "seal"
   badge (green) with an opaque WHITE checkmark on top, absolute-positioned
   so it overlaps the left edge of the label pill (the label's own 12px
   left-padding is reserved for it) — NOT a plain 10x10 stroke checkmark.
   Re-measured live 2026-09-06: icon rect 22x22, label unchanged (12px/700,
   rgb(38,201,155) text, rgba(14,203,129,.12) bg, 2px radius). */
.bg-status-badge.verified {
  position: relative;
  padding: 0;
  background: transparent;
  color: transparent;
}
.bg-verified-icon {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  line-height: 0;
}
.bg-status-badge.verified .bg-status-badge-text {
  display: inline-block;
  margin-left: 12px;
  padding: 0 6px 0 12px;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 700;
  line-height: 18px;
  height: 18px;
  color: #26c99b;
  background: rgba(14,203,129,0.12);
  white-space: nowrap;
}

/* Action icons row: Deposit / Withdraw / Transfer */
.bg-action-row {
  display: flex;
  padding: 0.15rem 1rem 1rem;
  background: #0a0c10;
  gap: 0.5rem;
}
.bg-action-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: none;
  color: rgba(255,255,255,0.8);
  cursor: pointer;
  font-family: 'Pulse', 'Manrope', sans-serif;
  padding: 0.4rem 0;
}
.bg-action-icon {
  /* bitget's icon row (.mi-icon.w-44px): 44x44, rounded-SQUARE (12px radius,
     not a circle), solid dark-grey fill rgb(37,38,41), white icon — not the
     cyan-tinted circle we had; measured live 2026-09-06. */
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #252629;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f4f5f7;
}
.bg-action-label { font-size: 0.75rem; font-weight: 400; color: #f4f5f7; }

/* VIP progress widget ("prospect-task" on bitget) — measured live 2026-09-06:
   it's a plain neutral-bordered card (NOT an amber glow box), border
   rgb(39,40,43), radius 12px, no fill; body text is full-brightness
   (not gold-highlighted) at 11px/500; the track+percent+info-icon sit in
   ONE row (not stacked); track is 4px tall (not 6px), radius 1px (not pill),
   bg rgb(56,57,61); fill is a solid tan rgb(255,213,131) (not a gradient);
   the Deposit button here is WHITE with a 6px radius (not an amber pill). */
.bg-vip-progress {
  margin: 0.75rem 1rem;
  background: transparent;
  border: 1px solid #27282b;
  border-radius: 12px;
  padding: 1rem;
}
.bg-vip-progress-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0;
}
.bg-vip-progress-text {
  font-size: 0.6875rem;
  font-weight: 500;
  color: #f4f5f7;
  line-height: 1.3;
}
.bg-vip-progress-text strong { color: #f4f5f7; font-weight: 500; }
.bg-vip-deposit-btn {
  flex-shrink: 0;
  background: #fff;
  color: #151517;
  border: none;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 5px 8px;
  cursor: pointer;
  white-space: nowrap;
}
.bg-vip-progress-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.bg-vip-progress-track {
  flex: 1;
  height: 4px;
  border-radius: 1px;
  background: #38393d;
  overflow: hidden;
}
.bg-vip-progress-fill {
  height: 100%;
  border-radius: 1px;
  background: #ffd583;
  width: 0%;
  transition: width 0.4s ease;
}
.bg-vip-progress-nums {
  flex-shrink: 0;
  font-size: 0.625rem;
  font-weight: 500;
  color: rgba(244,245,247,0.5);
}
.bg-vip-progress-info {
  flex-shrink: 0;
  display: flex;
  color: rgba(244,245,247,0.5);
}

.bg-section-divider {
  height: 8px;
  min-height: 8px;
  /* Sits inside a flex column (.mob-screen) that can run out of room —
     without flex-shrink:0 the browser shrinks this empty divider down to
     its ~2px min-content (just the two borders touching) before it shrinks
     any of the text-bearing rows around it, so the line between the
     Deposit/Withdraw/Transfer row and the Assets menu below it was
     rendering almost invisibly thin (2026-09-06 fix). */
  flex-shrink: 0;
  background: rgba(255,255,255,0.04);
  border-top: 1px solid rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* 30D stats */
.bg-stats-section {
  background: #0a0c10;
  padding: 1rem 1rem 0;
}
.bg-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.bg-stat-item {
  padding: 0.15rem 0 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.bg-stat-item:nth-child(odd) { padding-right: 1rem; border-right: 1px solid rgba(255,255,255,0.07); }
.bg-stat-item:nth-child(even) { padding-left: 1rem; }
.bg-stat-label {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.45);
}
.bg-stat-val {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  display: block;
}
.bg-stat-sub {
  display: block;
  font-size: 0.68rem;
  color: rgba(255,255,255,0.35);
  margin-top: 1px;
}
.bg-more-btn {
  display: flex;
  align-items: center;
  gap: 3px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 0.82rem;
  font-weight: 500;
  font-family: 'Pulse', 'Manrope', sans-serif;
  cursor: pointer;
  padding: 0.55rem 0 0.9rem;
}
.bg-more-btn:hover { color: rgba(255,255,255,0.8); }

/* Menu list — bitget's ".micro-menu-item" has NO divider lines between rows
   (spacing comes from an 8px vertical rounded-hover-highlight row instead),
   and its icons are BARE 20x20 glyphs with no background box; label is
   14px/400, not 14.4px/500. Measured live 2026-09-06. */
.bg-menu-list {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  background: #0a0c10;
}
.bg-menu-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  height: 48px;
  padding: 0 1rem;
  border-radius: 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.bg-menu-item:active { background: rgba(255,255,255,0.05); }
.bg-menu-icon-wrap {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #f4f5f7;
}
.bg-menu-label {
  flex: 1;
  font-size: 0.875rem;
  color: #f4f5f7;
  font-weight: 400;
}
.bg-menu-arrow {
  color: rgba(244,245,247,0.55);
  flex-shrink: 0;
}
.bg-logout-wrap {
  padding: 0.5rem 1rem 0;
  margin-top: 0.5rem;
  background: #0a0c10;
}
.bg-logout-btn {
  width: 100%;
  height: 48px;
  background: #252629;
  border: 1px solid #252629;
  border-radius: 12px;
  color: #f4f5f7;
  font-family: 'Pulse', 'Manrope', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.bg-logout-btn:active { background: #1f2023; }

/* Digit typography — same "Pulse" numeral face + tabular-nums used for prices
   elsewhere in this file (see #orderAmount etc.), applied to every numeral in
   the own-account panel and the merchant public profile so UID/VIP-progress/
   30D-stat digits render identically to bitget's numerals, not just the same
   colour/spacing. */
.bg-uid-row,
.bg-status-badge,
.bg-vip-progress-nums,
.bg-stat-val,
.bg-stat-sub,
.mp-ad-price,
.mp-ad-meta {
  font-family: 'Pulse', 'Manrope', sans-serif;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1, 'lnum' 1;
}

/* Merchant public profile — Follow/Block row */
.mp-follow-btn, .mp-block-btn {
  flex: 1;
  height: 36px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: 'Pulse', 'Manrope', sans-serif;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.mp-follow-btn { background: #f4f5f7; color: #0a0c10; border: none; }
.mp-block-btn { background: transparent; color: #f4f5f7; border: 1px solid #38393d; }

/* Merchant public profile — that trader's other ads */
.mp-ads-list { padding: 0 1rem 1rem; background: #0a0c10; }
.mp-ad-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.mp-ad-row:last-child { border-bottom: none; }
.mp-ad-price { font-size: 1rem; font-weight: 700; color: #fff; }
.mp-ad-cur { font-size: 0.75rem; color: rgba(255,255,255,0.45); }
.mp-ad-meta { font-size: 0.75rem; color: rgba(255,255,255,0.45); }

/* Trading Data screen */
.bg-td-wrap {
  padding: 1.2rem 1rem;
  background: #0a0c10;
  min-height: 100%;
}
.bg-td-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 1rem;
}
.bg-td-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.bg-td-label {
  font-size: 0.83rem;
  color: rgba(255,255,255,0.45);
}
.bg-td-right { display: flex; flex-direction: column; align-items: flex-end; }
.bg-td-val {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
}
.bg-td-sub {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.35);
  margin-top: 2px;
}

/* Gate.io offer cards */
.gc-newcomer-tag {
  display: inline-block;
  background: var(--p2p-green);
  color: #061309;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.18rem 0.55rem;
  border-radius: 4px;
  margin-bottom: 0.6rem;
}

.gc-card-top {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.5rem;
}

.gc-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gc-name {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--p2p-text);
}

.gc-meta {
  margin: 2px 0 0;
  font-size: 0.72rem;
  color: var(--p2p-muted);
}

.gc-price {
  margin: 0.5rem 0;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--p2p-text);
}

.gc-card-mid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.gc-card-stats {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.gc-card-stats > div {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.78rem;
}

.gc-label { color: var(--p2p-muted); }
.gc-val { color: var(--p2p-text); font-weight: 500; }

.gc-action-btn {
  min-height: 38px;
  padding: 0 1.4rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}

.gc-payments {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding-top: 0.4rem;
  border-top: 1px solid rgba(255,255,255,0.05);
}

/* ===== GATE.IO STYLE OFFER CARDS ===== */
.gate-offer-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  background: #0a0c10;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  padding: 1rem 0.9rem;
}

.gate-card-left { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.gate-card-right { display: flex; flex-direction: column; align-items: flex-end; gap: 0.55rem; padding-top: 0.1rem; }

.gate-user-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.gate-username {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
}

.gate-diamond {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.gate-stats-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  color: #8a97ae;
}

.gate-sep { color: #3a3f4e; }

.gate-online-row {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  color: #8a97ae;
  margin-top: 1px;
}

.gate-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #16c784;
  flex-shrink: 0;
}

.gate-price {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  margin: 0.35rem 0 0.1rem;
  line-height: 1.1;
}

.gate-currency {
  font-size: 0.75rem;
  font-weight: 500;
  color: #8a97ae;
}

.gate-info-row {
  display: flex;
  gap: 0.4rem;
  font-size: 0.76rem;
  line-height: 1.5;
}

.gate-info-label { color: #6b7690; }
.gate-info-val { color: #c8cdd8; font-weight: 500; }

.gate-pay-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 0.3rem;
}

.gate-pay-bar {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  color: #c8cdd8;
  padding: 0 6px 0 8px;
  height: 22px;
  border-left: 2.5px solid #2563eb;
  background: rgba(37,99,235,0.08);
  border-radius: 0 4px 4px 0;
}

.gate-buy-btn {
  min-width: 72px;
  height: 36px;
  border: none;
  border-radius: 999px;
  background: #16c784;
  color: #000;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  padding: 0 1.2rem;
  white-space: nowrap;
  font-family: 'Pulse', 'Manrope', sans-serif;
}

.gate-sell-btn {
  background: #f6465d;
  color: #fff;
}

.gate-buy-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.gate-big-badge {
  font-size: 0.67rem;
  font-weight: 700;
  background: #a3e635;
  color: #000;
  border-radius: 4px;
  padding: 2px 6px;
  white-space: nowrap;
}

/* ── Mobile: card layout (≤ 768px) ── */
@media (max-width: 768px) {

  /* Tighter main padding + room for bottom nav */
  .p2p-main-wrap { padding: 0 0.75rem 0; }

  /* Locking html/body scroll and running the offer list in its own nested
     overflow:auto div (the previous approach here) is exactly what stops
     Safari from auto-hiding its own address bar — Safari only collapses its
     chrome in response to a scroll on the *document itself*, not a scroll
     inside a child element. Real exchange apps (and the rest of this site,
     e.g. trade.html/index.html) just let the page scroll normally, so P2P
     does too now: no shell lock, no inner scroll container.
     .p2p-header/.p2p-subnav use `position: fixed` (not sticky) to pin at the
     top here — this site's global `html, body { overflow-x: hidden }` makes
     the UA compute overflow-y as `auto` on both html AND body (a documented
     CSS Overflow quirk: overflow-x != visible forces the other axis off
     `visible`), which breaks position:sticky's containing-block resolution.
     `position: fixed` isn't affected by that and is what `.mobile-app-nav`
     already relies on everywhere else on the site, so .p2p-main-wrap gets a
     top padding equal to the header+subnav's real height to compensate for
     them leaving the flow. */
  .p2p-header { position: fixed; top: 0; left: 0; right: 0; }
  /* "P2P trading ▾" title row stays visible on mobile too (verified live on
     bitget.com 2026-09-05 — it sits between the fixed header and the offer
     list on both desktop and mobile), so it also gets pinned under the fixed
     header and .p2p-main-wrap's top padding grows to cover both bars. */
  .p2p-title-row { position: fixed; top: 53px; left: 0; right: 0; z-index: 195; }
  .p2p-title-wrap { padding: 0.55rem 1rem; }
  /* Sub-nav bar removed on mobile 2026-09-05: it used to hold the
     Express/P2P/Block Trade tabs (now gone, folded into the header's "More"
     dropdown) and the Orders/My Ads/Profile row (already hidden here in
     favor of the bottom tab bar) — nothing mobile-visible is left in it, so
     hide the whole bar and give its height back to the offer-card list
     instead of leaving an empty strip. */
  .p2p-subnav { display: none; }
  .p2p-main-wrap { padding-top: 93px !important; }

  body.p2p-page[data-mobile-tab="p2p"]:not(.mob-screen-open) .p2p-board {
    margin-bottom: 0;
    /* bottom nav removed — no reserved space needed, list runs to the
       bottom of the page (still respecting the safe area on notched phones) */
    padding-bottom: env(safe-area-inset-bottom);
  }

  body.p2p-page[data-mobile-tab="p2p"]:not(.mob-screen-open) #orders,
  body.p2p-page[data-mobile-tab="p2p"]:not(.mob-screen-open) #ads,
  body.p2p-page[data-mobile-tab="p2p"]:not(.mob-screen-open) #profile {
    display: none !important;
  }

  /* Header compact */
  .p2p-header-inner { height: 52px; padding: 0 1rem; gap: 0.75rem; }
  .p2p-brand-word { font-size: 1rem; }
  .p2p-brand-logo {
    width: 26px;
    height: 26px;
    padding: 2px;
    border-radius: 9px;
  }

  /* .p2p-subnav is fully hidden on mobile now (see rule above) — the tab
     row and the 3-dot dropdown that used to live in it are both gone from
     here (dropdown moved to the header, see .p2p-header-actions), so no
     mobile-specific subnav layout rules are needed any more. */

  /* Hero: compact, hide promo banner */
  .p2p-hero { padding: 0.9rem 0 0.6rem; flex-direction: column; gap: 0; }
  .p2p-hero-left h1 { font-size: 1.4rem; }
  .p2p-hero-left p { font-size: 0.78rem; }
  .p2p-hero-stats { margin-top: 0.4rem; gap: 1rem; }
  .p2p-hero-right { display: none; }

  /* Board topbar: tabs on left, merchant btn on right, no logout */
  .p2p-board-topbar { margin-bottom: 0.75rem; }
  .p2p-logout-btn { display: none; }
  .p2p-merchant-btn { font-size: 0.75rem; padding: 0 0.75rem; height: 34px; }
  .side-tab { font-size: 0.88rem; padding: 0 0.85rem; min-height: 38px; }

  /* Filter bar: horizontal scroll */
  .p2p-filter-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0.45rem;
    padding-bottom: 0.25rem;
    margin-bottom: 0.6rem;
  }
  .p2p-filter-bar::-webkit-scrollbar { display: none; }
  .p2p-filter-chip { flex-shrink: 0; }
  .p2p-filter-amount { flex-shrink: 0; min-width: 130px; }
  .p2p-filter-btn, .p2p-refresh-btn { flex-shrink: 0; }

  /* Alert bar compact */
  .p2p-alert-bar { padding: 0.4rem 0.6rem; }
  .p2p-alert-bar span { font-size: 0.72rem; }

  /* HIDE desktop table, SHOW mobile cards */
  .p2p-table-wrap { display: none; }
  .p2p-cards { display: flex !important; flex-direction: column; }
  .p2p-table-meta { display: none; }
}

/* ── Mobile offer card styling ── */
@media (max-width: 768px) {

  .p2p-offer-card {
    background: #0a0c10;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px;
    padding: 0.85rem;
    display: grid;
    gap: 0.6rem;
  }

  /* Card top row: avatar + name left, price right */
  .p2p-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
  }

  .p2p-card-user {
    display: flex;
    align-items: center;
    gap: 0.55rem;
  }

  .card-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f2a434, #e06c20);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .p2p-card-title {
    font-size: 0.88rem;
    font-weight: 700;
    margin: 0;
  }

  .p2p-card-time {
    font-size: 0.72rem;
    color: var(--p2p-muted);
    margin: 2px 0 0;
  }

  .p2p-card-right { text-align: right; }

  .p2p-card-order-meta {
    font-size: 0.72rem;
    color: var(--p2p-muted);
    margin: 0;
  }

  .p2p-card-price {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--p2p-green);
    margin: 2px 0 0;
  }

  .price-currency {
    font-size: 0.75rem;
    font-weight: 600;
  }

  /* Card detail grid: limits + available */
  .p2p-card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem 0.5rem;
  }

  /* Card payment chips row */
  .p2p-card-payments {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }

  /* Card action: full-width buy/sell button */
  .p2p-card-actions button {
    width: 100%;
    min-height: 40px;
    border-radius: 999px;
    font-size: 0.88rem;
  }

  /* JS card detail rows */
  .p2p-card-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.25rem;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    padding: 0.5rem 0.65rem;
  }

  .p2p-card-details p {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .p2p-card-details span {
    font-size: 0.68rem;
    color: var(--p2p-muted);
  }

  .p2p-card-details strong {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--p2p-text);
  }

  /* Card footer: payment chips + action button */
  .p2p-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
  }

  .card-payment-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    flex: 1;
  }

  .p2p-card-footer .offer-action-btn {
    min-height: 36px;
    padding: 0 1.1rem;
    border-radius: 999px;
    font-size: 0.82rem;
    white-space: nowrap;
    flex-shrink: 0;
  }
}

/* ===== KYC FULL-SCREEN PAGES (mob-screen style) ===== */
/* ===== KYC FULL-PAGE SCREENS ===== */
.mob-kyc-fp-body {
  padding: 1rem 1rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow-y: auto;
  flex: 1;
}

.mob-kyc-fp-intro {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  background: rgba(240,185,11,0.08);
  border: 1.5px solid rgba(240,185,11,0.3);
  border-radius: 14px;
  padding: 1rem;
}

.mob-kyc-fp-intro-icon { font-size: 1.8rem; flex-shrink: 0; }

.mob-kyc-fp-intro-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
}

.mob-kyc-fp-intro-desc {
  font-size: 0.72rem;
  color: #8a97ae;
  margin-top: 3px;
  line-height: 1.45;
}

.mob-kyc-fp-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.mob-kyc-fp-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.mob-kyc-fp-label {
  font-size: 0.73rem;
  font-weight: 600;
  color: #00b8d4;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.mob-kyc-fp-input {
  height: 50px;
  border-radius: 12px;
  border: 1.5px solid rgba(255,255,255,0.1);
  background: #111114;
  color: #fff;
  padding: 0 1rem;
  font-size: 0.92rem;
  font-weight: 500;
  outline: none;
  width: 100%;
  -webkit-appearance: none;
  box-sizing: border-box;
  font-family: 'Pulse', 'Manrope', sans-serif;
}

.mob-kyc-fp-input:focus {
  border-color: #00b8d4;
  background: #161618;
}
.mob-kyc-fp-input option { background: #111114; color: #fff; }

.mob-kyc-fp-btn {
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(96deg,#00b8d4,#00b8d4);
  color: #000;
  font-size: 1.02rem;
  font-weight: 800;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 20px rgba(240,185,11,0.3);
  font-family: 'Pulse', 'Manrope', sans-serif;
  margin-top: 0.5rem;
}

.mob-kyc-fp-btn { transition: transform 0.1s ease, box-shadow 0.12s; }
.mob-kyc-fp-btn:active { transform: scale(0.95); box-shadow: 0 2px 8px rgba(240,185,11,0.15); }
.mob-kyc-fp-btn:disabled { opacity: 0.5; cursor: default; transform: none; }

.mob-kyc-fp-hint {
  font-size: 0.75rem;
  font-weight: 500;
  min-height: 1rem;
  margin: 0;
  text-align: center;
}
.mob-kyc-fp-hint.error { color: #f6465d; }
.mob-kyc-fp-hint.success { color: #16c784; }

.mob-kyc-fp-note {
  font-size: 0.68rem;
  color: #4e5a6e;
  text-align: center;
  margin: 0;
}

.mob-kyc-fp-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.74rem;
  color: #8a97ae;
  line-height: 1.55;
  cursor: pointer;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 0.8rem;
}

.mob-kyc-fp-consent input {
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: #00b8d4;
  width: 16px;
  height: 16px;
}

/* Upload cards */
.mob-kyc-upload-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.mob-kyc-upload-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #111114;
  border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  flex-wrap: wrap;
}

.mob-kyc-upload-card.done {
  border-color: rgba(22,199,132,0.4);
  background: rgba(22,199,132,0.05);
}

.mob-kyc-upload-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 1;
  min-width: 0;
}

.mob-kyc-upload-ico { font-size: 1.5rem; flex-shrink: 0; }

.mob-kyc-upload-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
}

.mob-kyc-upload-hint {
  font-size: 0.67rem;
  color: #6b7690;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.mob-kyc-upload-btn {
  flex-shrink: 0;
  min-height: 34px;
  padding: 0 1rem;
  border-radius: 8px;
  background: rgba(240,185,11,0.15);
  border: 1.5px solid rgba(240,185,11,0.4);
  color: #00b8d4;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mob-kyc-thumb {
  width: 100%;
  max-height: 80px;
  object-fit: cover;
  border-radius: 8px;
  margin-top: 4px;
  border: 1px solid rgba(255,255,255,0.1);
  display: block;
}

/* KYC badge in menu */
#kycStatusBadge { display: inline-block; }

/* Dispute button */
.order-dispute-btn {
  background: linear-gradient(96deg, #e53e3e, #c53030);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.6rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  margin-top: 0.4rem;
  -webkit-tap-highlight-color: transparent;
}
.order-dispute-btn:disabled {
  background: rgba(229,62,62,0.35);
  color: rgba(255,255,255,0.5);
  cursor: not-allowed;
}

/* Load More button */
.load-more-btn {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  border-radius: 8px;
  padding: 0.55rem 1.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s;
}
.load-more-btn:hover { background: rgba(255,255,255,0.12); }
.load-more-btn:active { background: rgba(255,255,255,0.05); }

.p2p-empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--p2p-muted);
}
.p2p-empty-state p {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}
.p2p-post-ad-cta {
  background: linear-gradient(135deg, #00b8d4, #0288d1);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.6rem 1.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}
.mob-tab-post-ad svg { stroke: #00b8d4; }
.mob-tab-post-ad span { color: #00b8d4; }

/* ══ Mobile Post Ad Screen ══ */
.mob-post-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.mob-ptab {
  flex: 1;
  background: none;
  border: none;
  color: var(--p2p-muted);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.85rem 0;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.mob-ptab.active {
  color: #00b8d4;
  border-bottom-color: #00b8d4;
}
.mob-post-section {
  padding: 1rem;
  flex: 1;
  overflow-y: auto;
}
.mob-ad-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.9rem;
}
.mob-ad-form label span {
  font-size: 0.78rem;
  color: var(--p2p-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.mob-ad-form input,
.mob-ad-form select {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  color: #fff;
  padding: 0.7rem 0.85rem;
  font-size: 16px;
  width: 100%;
  box-sizing: border-box;
  -webkit-appearance: none;
}
.mob-ad-form input:focus,
.mob-ad-form select:focus {
  outline: none;
  border-color: #00b8d4;
}
.mob-ad-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}
.mob-ad-submit-btn {
  width: 100%;
  padding: 0.85rem;
  background: linear-gradient(135deg, #00b8d4, #0288d1);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 0.5rem;
}
.mob-ad-submit-btn:disabled { opacity: 0.6; }
.mob-ad-meta {
  text-align: center;
  font-size: 0.82rem;
  color: var(--p2p-muted);
  margin-top: 0.6rem;
}
.mob-myads-list { display: flex; flex-direction: column; gap: 0.75rem; }
.mob-myads-empty { color: var(--p2p-muted); text-align: center; padding: 2rem 0; font-size: 0.9rem; }
.mob-myad-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 0.9rem;
}
.mob-myad-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.4rem; }
.mob-myad-type { font-size: 0.75rem; font-weight: 700; padding: 2px 8px; border-radius: 4px; }
.mob-myad-type.sell { background: rgba(246,70,93,0.15); color: #f6465d; }
.mob-myad-type.buy { background: rgba(14,203,129,0.15); color: #0ecb81; }
.mob-myad-status { font-size: 0.72rem; font-weight: 600; padding: 2px 7px; border-radius: 999px; }
.mob-myad-status.active { background: rgba(14,203,129,0.15); color: #0ecb81; }
.mob-myad-status.paused { background: rgba(255,255,255,0.08); color: var(--p2p-muted); }
.mob-myad-price { font-size: 1rem; font-weight: 700; color: #fff; margin-bottom: 0.25rem; }
.mob-myad-meta { font-size: 0.78rem; color: var(--p2p-muted); margin-bottom: 0.6rem; }
.mob-myad-actions { display: flex; gap: 0.5rem; }
.mob-myad-btn {
  flex: 1;
  padding: 0.45rem 0;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
.mob-myad-btn.danger { border-color: rgba(246,70,93,0.4); color: #f6465d; background: rgba(246,70,93,0.08); }
.mob-myad-btn.edit { border-color: rgba(0,184,212,0.4); color: #00b8d4; background: rgba(0,184,212,0.08); }

/* ══════════════════════════════════════
   SUPPORT SCREEN (Bitget-style, dark)
   ══════════════════════════════════════ */
#mobSupportScreen,
#mobSupportChatScreen {
  background: #0a0c10;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Header */
.sp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  height: 52px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  background: #0a0c10;
  flex-shrink: 0;
}
.sp-head-center {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
}
.sp-bot-icon { font-size: 1.2rem; line-height: 1; }
.sp-head-title { font-size: 0.9rem; font-weight: 700; color: #fff; }
.sp-close-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 1rem;
  cursor: pointer;
  padding: 4px;
  width: 34px;
  text-align: right;
}

/* Body scroll */
.sp-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 5rem;
}
.sp-body::-webkit-scrollbar { display: none; }

/* Sections */
.sp-section {
  padding: 1rem 1rem 0;
  border-bottom: 8px solid rgba(255,255,255,0.04);
  padding-bottom: 1rem;
}
.sp-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  color: #fff;
}
.sp-section-head strong { font-weight: 700; }

/* Announcements */
.sp-ann-list { display: flex; flex-direction: column; gap: 0; }
.sp-ann-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 0.85rem;
  color: rgba(255,255,255,0.8);
  cursor: pointer;
}
.sp-ann-item:last-child { border-bottom: none; }

/* FAQ Pills (top questions) */
.sp-faq-pills { display: flex; flex-direction: column; gap: 0.5rem; }
.sp-faq-pill {
  text-align: left;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px;
  color: rgba(255,255,255,0.85);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.55rem 1rem;
  cursor: pointer;
  font-family: 'Pulse', 'Manrope', sans-serif;
  -webkit-tap-highlight-color: transparent;
}
.sp-faq-pill:active { background: rgba(255,255,255,0.1); }

/* Self-service grid */
.sp-viewall-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.45);
  font-size: 0.8rem;
  cursor: pointer;
  font-family: 'Pulse', 'Manrope', sans-serif;
}
.sp-service-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.sp-service-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 12px;
  padding: 0.8rem 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.85);
  font-weight: 600;
  cursor: pointer;
}
.sp-service-icon { font-size: 1.2rem; }
.sp-showmore-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  font-size: 0.8rem;
  cursor: pointer;
  font-family: 'Pulse', 'Manrope', sans-serif;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0;
}

/* FAQ list */
.sp-faq-list { display: flex; flex-direction: column; }
.sp-faq-cat { border-bottom: 1px solid rgba(255,255,255,0.06); }
.sp-faq-cat:last-child { border-bottom: none; }
.sp-faq-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 0;
  font-size: 0.86rem;
  color: rgba(255,255,255,0.8);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.sp-faq-row span { flex: 1; }
.sp-faq-chevron { flex-shrink: 0; transition: transform 0.22s ease; color: rgba(255,255,255,0.4); }
.sp-faq-cat.open .sp-faq-chevron { transform: rotate(180deg); }
.sp-faq-items {
  display: none;
  flex-direction: column;
  gap: 0;
  padding-bottom: 0.5rem;
}
.sp-faq-cat.open .sp-faq-items { display: flex; }
.sp-faq-item {
  padding: 0.65rem 0.1rem 0.65rem 0.85rem;
  border-left: 2px solid rgba(0,184,212,0.3);
  margin-bottom: 0.5rem;
  border-radius: 0 6px 6px 0;
}
.sp-faq-item:last-child { margin-bottom: 0; }
.sp-faq-item strong { display: block; font-size: 0.81rem; color: #fff; margin-bottom: 0.25rem; }
.sp-faq-item p { font-size: 0.77rem; color: rgba(255,255,255,0.6); line-height: 1.5; margin: 0; }

/* Sticky chat footer */
.sp-chat-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
  background: #0a0c10;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.sp-chat-btn {
  width: 100%;
  height: 48px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: 'Pulse', 'Manrope', sans-serif;
}
.sp-chat-btn:active { background: rgba(255,255,255,0.12); }

/* ── Chat screen ── */
.sp-chat-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
}
.sp-chat-body::-webkit-scrollbar { display: none; }
.sp-chat-time {
  text-align: center;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.35);
  margin-bottom: 0.75rem;
}
.sp-bot-bubble {
  background: rgba(255,255,255,0.07);
  border-radius: 2px 14px 14px 14px;
  padding: 0.75rem 0.9rem;
  margin: 0 1rem 0.6rem;
  max-width: 85%;
  align-self: flex-start;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.9);
  line-height: 1.5;
}
.sp-bot-bubble p { margin: 0 0 0.3rem; }
.sp-bot-bubble p:last-of-type { margin-bottom: 0; }
.sp-topic-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.65rem;
}
.sp-topic-chip {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 999px;
  color: rgba(255,255,255,0.8);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  font-family: 'Pulse', 'Manrope', sans-serif;
  -webkit-tap-highlight-color: transparent;
}
.sp-topic-chip:active { background: rgba(0,184,212,0.15); border-color: #00b8d4; color: #00b8d4; }

/* Chat input area */
.sp-chat-input-area {
  flex-shrink: 0;
  padding: 0.6rem 1rem calc(0.6rem + env(safe-area-inset-bottom));
  background: #0a0c10;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.sp-tickets-btn {
  align-self: flex-start;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 999px;
  color: rgba(255,255,255,0.75);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  cursor: pointer;
  font-family: 'Pulse', 'Manrope', sans-serif;
}
.sp-input-row {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 0 0.5rem 0 0.9rem;
  gap: 0.4rem;
}
.sp-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: #fff;
  font-size: 16px;
  font-family: 'Pulse', 'Manrope', sans-serif;
  padding: 0.65rem 0;
}
.sp-input::placeholder { color: rgba(255,255,255,0.3); }
.sp-send-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.45);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 4px;
}
.sp-send-btn:active { color: #00b8d4; }

/* ── Chat screen ── */
#mobSupportChatScreen {
  overflow: hidden;
  padding-bottom: 0 !important;
  /* Let inset:0 + interactive-widget=resizes-content control height */
  /* GPU layer */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
#mobSupportChatScreen .sp-chat-input-area {
  padding-bottom: calc(0.6rem + env(safe-area-inset-bottom));
  flex-shrink: 0;
  position: relative;
  bottom: auto;
}
/* Prevent rubber-band scroll causing layout jump */
#mobSupportChatScreen .sp-chat-body {
  overscroll-behavior: none;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  /* Prevent iOS bounce that causes shake */
  touch-action: pan-y;
}

/* ── Agent status badge ── */
.sp-agent-status {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.5);
  white-space: nowrap;
  transition: background 0.25s, color 0.25s;
}
.sp-agent-status.active {
  background: rgba(0,184,212,0.12);
  color: #00b8d4;
}
.sp-agent-status.waiting {
  background: rgba(240,185,11,0.1);
  color: #f0b90b;
}

/* ── Connect to Agent banner ── */
.sp-connect-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: rgba(0,184,212,0.05);
  border-top: 1px solid rgba(0,184,212,0.18);
  padding: 0.7rem 1rem;
  flex-shrink: 0;
}
.sp-connect-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: 1;
  min-width: 0;
}
.sp-connect-icon {
  font-size: 1.35rem;
  flex-shrink: 0;
}
.sp-connect-title {
  font-size: 0.83rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}
.sp-connect-sub {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.45);
  margin-top: 0.1rem;
}
.sp-connect-btn {
  background: #00b8d4;
  color: #000;
  border: none;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.45rem 1rem;
  cursor: pointer;
  font-family: 'Pulse', 'Manrope', sans-serif;
  flex-shrink: 0;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.sp-connect-btn:active { opacity: 0.75; }
.sp-connect-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Support chat screen: fully fixed, no shake on keyboard ── */
#mobSupportChatScreen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  height: 100% !important;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
  overflow: hidden;
}
#mobSupportChatScreen .sp-chat-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
#mobSupportChatScreen .sp-chat-input-area {
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  z-index: 2;
}
/* ── Live agent direct button in support screen ── */
.sp-direct-agent-btn {
  width: 100%;
  background: #00b8d4;
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 14px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

