/* ===== Header — BitradeX full-width bar ===== */
:root {
  --bx-bg: #000000;
  --bx-panel: #131516;
  --bx-border: #2a2d31;
  --bx-text: #fafafa;
  --bx-muted: #84888c;
  --bx-cyan: #f68f15;
  --bx-cyan2: #ff9f2e;
  --bx-orange: #f68f15;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  background: var(--bx-bg);
  border-bottom: 1px solid rgba(43,49,57,.85);
  overflow: visible;
}

.hdr-bar {
  display: flex;
  align-items: center;
  gap: 8px 18px;
  height: 64px;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 clamp(16px, 2.2vw, 36px);
  position: relative;
  overflow: visible;
  box-sizing: border-box;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  text-decoration: none;
}
.brand-mark {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: contain;
  background: #000;
}
.brand-name {
  color: #fafafa;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1;
}
.brand-logo {
  display: block;
  height: 28px;
  width: auto;
}

.hdr-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  min-width: 0;
  height: 100%;
  overflow: visible;
}

.nav-link,
button.nav-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--bx-text);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 0 12px;
  height: 64px;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  line-height: 1;
  opacity: .9;
}
.nav-link:hover,
.nav-link.active,
.nav-drop.active > .nav-link,
.nav-drop.open > .nav-link,
.nav-drop:hover > .nav-link {
  opacity: 1;
  color: #fff;
}
.nav-link.active,
.nav-drop.active > .nav-link {
  box-shadow: inset 0 -2px 0 var(--bx-cyan);
}

.caret {
  display: inline-block;
  width: 0;
  height: 0;
  margin-top: 2px;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  border-top: 4px solid currentColor;
  opacity: .65;
  transition: transform .15s;
}
.nav-drop.open .caret,
.nav-drop:hover .caret {
  transform: rotate(180deg);
}

.nav-drop {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 100%;
}

.nav-mega {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% - 2px);
  min-width: 320px;
  padding: 14px;
  background: #1a1d23;
  border: 1px solid #2b3139;
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0,0,0,.55);
  z-index: 2000;
  animation: megaIn .14s ease-out;
}
.nav-sub {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% - 2px);
  min-width: 148px;
  padding: 8px;
  background: #131516;
  border: 1px solid #2a2d31;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0,0,0,.5);
  z-index: 2000;
  animation: megaIn .14s ease-out;
}
.nav-sub a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  color: #fafafa;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.nav-sub a:hover,
.nav-sub a.on {
  background: rgba(246,143,21,.12);
  color: #f68f15;
}
@keyframes megaIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.nav-drop.open .nav-mega,
.nav-drop:hover .nav-mega,
.nav-drop:focus-within .nav-mega,
.nav-drop.open .nav-sub,
.nav-drop:hover .nav-sub,
.nav-drop:focus-within .nav-sub {
  display: block !important;
}
.mega-col { display: flex; flex-direction: column; gap: 6px; }
.mega-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  color: #848e9c;
  padding: 2px 8px 8px;
}
.mega-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
  transition: background .12s, border-color .12s;
}
.mega-card:hover,
.mega-card.on {
  background: rgba(246,143,21,.08);
  border-color: rgba(246,143,21,.22);
}
.mega-ico {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(246,143,21,.12);
  color: var(--bx-cyan);
}
.mega-ico svg { width: 18px; height: 18px; }
.mega-txt {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  padding-top: 1px;
}
.mega-txt strong {
  font-size: 14px;
  font-weight: 600;
  color: #fafafa;
  line-height: 1.25;
}
.mega-txt em {
  font-style: normal;
  font-size: 12px;
  color: #848e9c;
  line-height: 1.4;
}
.mega-card:hover .mega-txt strong,
.mega-card.on .mega-txt strong {
  color: var(--bx-cyan);
}

.hdr-auth {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: auto;
  font-size: 14px;
}
.auth-link {
  color: var(--bx-text);
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
}
.auth-link.muted { color: var(--bx-muted); }
.auth-nick {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.auth-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid rgba(246,143,21,.55);
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  background: transparent;
}
.auth-ghost:hover {
  border-color: var(--bx-cyan);
  background: rgba(246,143,21,.1);
  color: #fff;
}
.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 16px;
  border-radius: 8px;
  background: #f68f15;
  color: #000;
  font-weight: 700;
  text-decoration: none;
  font-size: 13px;
  white-space: nowrap;
}
.auth-btn:hover {
  filter: brightness(1.06);
  color: #000;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

.site-footer {
  border-top: 1px solid var(--bx-border);
  background: #000;
}
.sf-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 24px 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  align-items: center;
  justify-content: space-between;
  color: var(--bx-muted);
  font-size: 12px;
}
.sf-brand { display: flex; align-items: center; gap: 8px; }
.sf-brand .brand-mark { width: 22px; height: 22px; border-radius: 5px; }
.sf-brand .brand-name { font-size: 15px; font-weight: 700; color: #fafafa; }
.sf-links { display: flex; gap: 14px; }
.sf-links a { color: inherit; text-decoration: none; }
.sf-links a:hover { color: var(--bx-text); }

/* ===== Bitbase-style footer ===== */
.bb-footer {
  border-top: 1px solid #1a1b1e;
  background: #000;
  color: #fafafa;
  padding: 56px 0 28px;
}
.bb-ft-inner {
  width: min(100% - 48px, 1200px);
  margin: 0 auto;
}
.bb-ft-grid {
  display: grid;
  grid-template-columns: 1.15fr repeat(4, 1fr);
  gap: 32px 24px;
  align-items: start;
}
.bb-ft-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  margin-bottom: 22px;
}
.bb-ft-logo .brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #000;
}
.bb-ft-logo .brand-name {
  color: #fafafa;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.02em;
}
.bb-ft-h {
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 600;
  color: #fafafa;
}
.bb-ft-social {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 200px;
  margin-bottom: 22px;
}
.bb-ft-social a {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fafafa;
  background: #1f2023;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.bb-ft-social a:hover {
  background: #2a2d31;
  color: #f68f15;
}
.bb-ft-qr {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bb-ft-qr-box {
  width: 108px;
  height: 108px;
  border-radius: 10px;
  background: #fff;
  display: grid;
  place-items: center;
  position: relative;
  background-image:
    linear-gradient(#111 25%, transparent 25%),
    linear-gradient(90deg, #111 25%, transparent 25%),
    linear-gradient(#111 25%, transparent 25%),
    linear-gradient(90deg, #111 25%, transparent 25%);
  background-size: 14px 14px;
  background-position: 0 0, 0 0, 7px 7px, 7px 7px;
  background-color: #fff;
}
.bb-ft-qr-box img {
  width: 28px;
  height: 28px;
  background: #fff;
  border-radius: 4px;
  padding: 2px;
  z-index: 1;
}
.bb-ft-qr p {
  margin: 0;
  font-size: 12px;
  color: #84888c;
  max-width: 120px;
  line-height: 1.4;
}
.bb-ft-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.bb-ft-col a {
  color: #84888c;
  text-decoration: none;
  font-size: 13px;
  line-height: 1.35;
}
.bb-ft-col a:hover { color: #fafafa; }
.bb-ft-copy {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #1a1b1e;
  color: #84888c;
  font-size: 12px;
}

@media (max-width: 1024px) {
  .bb-ft-grid {
    grid-template-columns: 1fr 1fr;
  }
  .bb-ft-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .bb-footer { padding: 40px 0 24px; }
  .bb-ft-inner { width: min(100% - 28px, 1200px); }
  .bb-ft-grid { grid-template-columns: 1fr 1fr; gap: 28px 16px; }
}

.page-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 20px 48px;
}
.page-shell h1 { margin: 0 0 10px; font-size: 26px; color: var(--bx-text); }
.page-shell .lead {
  color: var(--bx-muted);
  margin: 0 0 24px;
  line-height: 1.6;
}
.card-box {
  background: var(--bx-panel);
  border: 1px solid var(--bx-border);
  border-radius: 12px;
  padding: 20px;
  color: var(--bx-text);
}
.form-row { margin-bottom: 14px; }
.form-row label {
  display: block;
  font-size: 12px;
  color: var(--bx-muted);
  margin-bottom: 6px;
}
.form-row input, .form-row textarea, .form-row select {
  width: 100%;
  background: #0f1011;
  border: 1px solid var(--bx-border);
  border-radius: 8px;
  color: var(--bx-text);
  padding: 11px 12px;
  font: inherit;
}
.btn-main {
  border: 0;
  border-radius: 8px;
  padding: 12px 18px;
  background: var(--bx-cyan);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.hdr-menu-btn { display: none; }

/* ===== Mobile drawer — BitradeX style ===== */
@media (max-width: 1100px) {
  .hdr-bar {
    height: 56px;
    padding: 0 14px;
    gap: 10px;
  }
  .brand { height: 56px; display: flex; align-items: center; }
  .hdr-nav { display: none !important; }
  .hdr-auth {
    height: 56px;
    gap: 8px;
  }
  .auth-hide-sm { display: none !important; }
  .hdr-menu-btn {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
  }
  .hdr-menu-btn span {
    display: block;
    height: 2px;
    width: 100%;
    background: #fafafa;
    border-radius: 2px;
  }
  .hdr-menu-btn:hover { background: rgba(255,255,255,.06); }

  body.nav-open { overflow: hidden; }

  .mobile-nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(0,0,0,.62);
    backdrop-filter: blur(2px);
  }

  .mobile-nav {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1201;
    width: min(82vw, 360px);
    height: 100dvh;
    background: #12151a;
    border-left: 1px solid #2b3139;
    box-shadow: -18px 0 48px rgba(0,0,0,.55);
    display: flex;
    flex-direction: column;
    animation: mnIn .18s ease-out;
  }
  @keyframes mnIn {
    from { transform: translateX(12px); opacity: .6; }
    to { transform: translateX(0); opacity: 1; }
  }
  .mobile-nav[hidden],
  .mobile-nav-backdrop[hidden] { display: none !important; }

  .mobile-nav-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 16px;
    border-bottom: 1px solid #2b3139;
    flex-shrink: 0;
  }
  .mobile-nav-head .brand-logo { height: 24px; }
  .mobile-nav-close {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #fafafa;
    font-size: 26px;
    cursor: pointer;
    line-height: 1;
  }
  .mobile-nav-close:hover { background: rgba(255,255,255,.06); }

  .mobile-nav-auth {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 18px 16px 10px;
    flex-shrink: 0;
  }
  .mn-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
  }
  .mn-btn.ghost {
    border: 1px solid rgba(246,143,21,.7);
    color: #fff;
    background: transparent;
  }
  .mn-btn.ghost:hover {
    background: rgba(246,143,21,.1);
  }
  .mn-btn.solid {
    background: #f68f15;
    color: #000;
    border: 0;
  }
  .mn-btn.solid:hover { filter: brightness(1.05); color: #000; }

  .mobile-nav-links {
    display: flex;
    flex-direction: column;
    padding: 8px 0 28px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
  }
  .mn-group {
    display: flex;
    flex-direction: column;
    margin: 4px 0 8px;
  }
  .mn-label {
    padding: 12px 20px 2px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    color: #84888c;
  }
  .mn-group a {
    padding-left: 32px;
    font-size: 15px;
  }
  .mobile-nav-links a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: #f5f6f7;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: -.01em;
    border: 0;
    transition: background .12s, color .12s;
  }
  .mobile-nav-links a:hover,
  .mobile-nav-links a.on {
    background: rgba(246,143,21,.08);
    color: #f68f15;
  }
  .mobile-nav-links a.mn-logout {
    margin-top: 10px;
    border-top: 1px solid #2b3139;
    color: #848e9c;
  }
  .mobile-nav-links a.mn-logout:hover {
    color: #f6465d;
    background: rgba(246,70,93,.08);
  }
}

@media (min-width: 1101px) {
  .hdr-menu-btn,
  .mobile-nav,
  .mobile-nav-backdrop { display: none !important; }
}

.money-sub {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 500;
  color: #84888c;
  font-style: normal;
}
.money-sub.inline {
  display: inline;
  margin-left: 6px;
}
