/* ═══════════════════════════════════════════════
   LAYOUT — Mobile only, Binance-style
═══════════════════════════════════════════════ */

/* ── TOPBAR ── */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  max-width: 480px;
  margin: 0 auto;
  height: var(--topbar-h);
  background: var(--canvas);
  border-bottom: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--sp-4);
  z-index: 200;
}

.topbar-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.topbar-logo-mark {
  width: 28px; height: 28px;
  background: var(--yellow);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.topbar-logo-mark svg { width: 16px; height: 16px; color: var(--on-yellow); }

.topbar-brand {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-on-dark);
  letter-spacing: -0.3px;
  white-space: nowrap;
}
.topbar-brand span { color: var(--yellow); }

.topbar-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.icon-btn {
  width: 36px; height: 36px;
  border-radius: var(--r-md);
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  flex-shrink: 0;
}
.icon-btn:active { background: var(--surface-elevated); }
.icon-btn svg { width: 17px; height: 17px; }

/* Bot running pill in topbar */
.bot-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: var(--r-pill);
  background: rgba(14,203,129,.12);
  border: 1px solid rgba(14,203,129,.25);
  font-size: 11px;
  font-weight: 600;
  color: var(--up);
  cursor: pointer;
  white-space: nowrap;
}
.bot-pill.stopped {
  background: rgba(246,70,93,.12);
  border-color: rgba(246,70,93,.25);
  color: var(--down);
}
.bot-pill-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--up);
  animation: blink 2s infinite;
}
.bot-pill.stopped .bot-pill-dot { background: var(--down); animation: none; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.3} }

/* ── PAGE CONTENT ── */
.page-content {
  padding: var(--sp-4);
  min-height: calc(100vh - var(--topbar-h) - var(--botnav-h));
}

/* ── BOTTOM NAV ── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  max-width: 480px;
  margin: 0 auto;
  height: var(--botnav-h);
  background: var(--surface-card);
  border-top: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 200;
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: var(--shadow-up);
}

.bnav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  flex: 1;
  padding: 6px 0;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 500;
  text-decoration: none;
  transition: color .15s;
  -webkit-tap-highlight-color: transparent;
}
.bnav-item.active { color: var(--yellow); }
.bnav-item:active { opacity: .7; }
.bnav-item svg { width: 20px; height: 20px; }

/* ── SLIDE MENU (full-screen drawer) ── */
.slide-menu {
  position: fixed;
  inset: 0;
  max-width: 480px;
  margin: 0 auto;
  background: var(--canvas);
  z-index: 300;
  transform: translateX(-100%);
  transition: transform .25s ease;
  overflow-y: auto;
  padding-top: var(--topbar-h);
}
.slide-menu.open { transform: translateX(0); }

.slide-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-5) var(--sp-4) var(--sp-4);
  border-bottom: 1px solid var(--hairline);
}
.slide-menu-title { font-size: 16px; font-weight: 700; }

.menu-credit-card {
  margin: var(--sp-4);
  background: var(--surface-card);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  border: 1px solid var(--hairline);
}
.menu-credit-label { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; letter-spacing: .5px; text-transform: uppercase; }
.menu-credit-value { font-size: 24px; font-weight: 700; color: var(--yellow); font-family: 'SF Mono','Roboto Mono',monospace; }
.menu-credit-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.menu-credit-bar { height: 3px; background: var(--hairline); border-radius: 99px; margin-top: 10px; overflow: hidden; }
.menu-credit-fill { height: 100%; background: var(--yellow); border-radius: 99px; width: 48%; }

.menu-section-label {
  padding: var(--sp-3) var(--sp-4) var(--sp-1);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.menu-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px var(--sp-4);
  color: var(--text-body);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--hairline);
  -webkit-tap-highlight-color: transparent;
}
.menu-link:active { background: var(--surface-card); }
.menu-link.active { color: var(--yellow); }
.menu-link-left { display: flex; align-items: center; gap: 12px; }
.menu-link svg { width: 18px; height: 18px; color: var(--text-muted); flex-shrink: 0; }
.menu-link.active svg { color: var(--yellow); }
.menu-link-chevron { color: var(--text-muted); }
.menu-link-chevron svg { width: 14px; height: 14px; }

/* ── SECTION HEADER ── */
.sec-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-3);
}
.sec-title { font-size: 14px; font-weight: 700; color: var(--text-on-dark); }
.sec-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ── SPACER ── */
.spacer { height: var(--sp-4); }
.spacer-sm { height: var(--sp-2); }

.topbar-brand .brand-sub { font-size:11px;font-weight:600;color:var(--text-muted);letter-spacing:1.5px;text-transform:uppercase;margin-left:2px; }
.topbar-logo-mark {
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.topbar-brand {
  display: flex;
  flex-direction: column;
  line-height: 1;
  gap: 1px;
}
.brand-neu { font-size: 14px; font-weight: 900; letter-spacing: -.3px; color: var(--text-on-dark); }
.brand-bot { font-size: 14px; font-weight: 900; letter-spacing: -.3px; color: var(--yellow); }
.brand-trade { font-size: 8.5px; font-weight: 700; letter-spacing: 2.5px; color: var(--text-muted); text-transform: uppercase; }
.brand-neu { font-size:14px;font-weight:900;letter-spacing:-.3px;color:var(--text-on-dark); }