/* ═══════════════════════════════════════════
   MyLiquidBot — app.css
   Design system unified with dashboard.html
   ═══════════════════════════════════════════ */
:root {
  /* ── Backgrounds (5 levels, matches dashboard) ── */
  --bg:    #07070b;
  --bg2:   #0d0d14;
  --bg3:   #121219;
  --bg4:   #181823;
  --bg5:   #1e1e2e;

  /* Legacy aliases → mapped to new system */
  --bg-primary:   var(--bg);
  --bg-secondary: var(--bg2);
  --bg-card:      var(--bg3);
  --bg-hover:     var(--bg5);

  /* ── Borders ── */
  --border:  rgba(255, 255, 255, 0.06);
  --border2: rgba(255, 255, 255, 0.10);

  /* ── Text ── */
  --text:           rgba(255, 255, 255, 0.88);
  --text-primary:   rgba(255, 255, 255, 0.88);
  --muted:          rgba(255, 255, 255, 0.38);
  --text-secondary: rgba(255, 255, 255, 0.38);
  --dim:            rgba(255, 255, 255, 0.18);

  /* ── Accent colors (premium crypto palette) ── */
  --up:    #3dba85;
  --up-bg: rgba(61, 186, 133, 0.09);
  --up-bd: rgba(61, 186, 133, 0.22);

  --dn:    #d95c6e;
  --dn-bg: rgba(217, 92, 110, 0.09);
  --dn-bd: rgba(217, 92, 110, 0.22);

  --accent:  #6c8dff;
  --acc-bg:  rgba(108, 141, 255, 0.09);
  --acc-bd:  rgba(108, 141, 255, 0.20);

  --warn:    #c9913a;
  --warn-bg: rgba(201, 145, 58, 0.10);
  --warn-bd: rgba(201, 145, 58, 0.25);

  --purple:  #9278e0;
  --pur-bg:  rgba(146, 120, 224, 0.09);

  /* Legacy aliases */
  --accent-green: var(--up);
  --accent-red:   var(--dn);
  --accent-blue:  var(--accent);
  --green: var(--up);
  --red:   var(--dn);

  /* ── Typography (matches dashboard: Syne + DM Sans + DM Mono) ── */
  --ff-display: 'Syne', sans-serif;
  --ff-body:    'DM Sans', sans-serif;
  --ff-mono:    'DM Mono', monospace;
  --ff-ibm:     'IBM Plex Mono', monospace;
  --font: var(--ff-body);
  --mono: var(--ff-mono);

  /* ── Radius + shadows ── */
  --r:  9px;
  --r2: 13px;
  --shadow-1: 0 6px 18px rgba(0, 0, 0, 0.45);
  --shadow-2: 0 10px 30px rgba(0, 0, 0, 0.55);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box
}

html {
  scroll-behavior: smooth;
  font-size: 14px
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff-body);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

/* ── Layout ── */
.wrap {
  width: 100%;
  padding: 0
}

header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  background: rgba(7, 7, 11, 0.96);
  border-bottom: 1px solid var(--border);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

header h1 {
  font-family: var(--ff-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .01em
}

.sub {
  color: var(--muted);
  font-size: 11px;
  font-family: var(--ff-mono);
  margin-top: 2px;
}

.right {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap
}

.wallet {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 12px 3px 10px;
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pill-group {
  display: flex;
  gap: 2px;
  padding: 2px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border)
}

.lang-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s
}

.lang-btn.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff
}

main {
  display: flex;
  flex-direction: column
}

/* ── Tabs (top nav) ── */
.tabs {
  display: flex;
  gap: 1px;
  padding: 0 10px;
  background: rgba(7, 7, 11, 0.96);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs[aria-hidden="true"] { display: none !important; }

.tab {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 11px 14px;
  cursor: pointer;
  font-family: var(--ff-body);
  font-weight: 500;
  font-size: 12.5px;
  border-bottom: 2px solid transparent;
  transition: background .15s, color .15s, border-color .15s, opacity .15s;
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.tab.active {
  color: var(--text);
  border-bottom-color: transparent;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px var(--border2);
  border-radius: 8px 8px 0 0;
}

/* ── Cards ── */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 13px;
}

.tabpane {
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
}

/* ── Buttons ── */
.btn {
  border: 1px solid var(--border2);
  background: var(--bg3);
  color: var(--text);
  padding: 5px 13px;
  border-radius: var(--r);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--ff-body);
  transition: background .15s, border-color .15s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  white-space: nowrap;
}

.btn:hover {
  background: var(--bg4);
}

.btn:active {
  background: var(--bg5);
}

.btn:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.btn.primary {
  border-color: var(--up-bd);
  background: var(--up-bg);
  color: var(--up);
}

.btn.primary:hover {
  background: rgba(61,186,133, 0.14);
}

.btn.sell {
  border-color: var(--dn-bd);
  background: var(--dn-bg);
  color: var(--dn);
}

.btn.sell:hover {
  background: rgba(217,92,110, 0.14);
}

.btn-chip {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
}

.btn-chip.active {
  border-color: var(--border2);
  background: var(--bg5);
  color: var(--text);
}

/* ── Inputs ── */
input,
select {
  padding: 8px 10px;
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text);
  font-size: 12.5px;
  font-family: var(--ff-body);
  transition: border-color .15s;
  -webkit-appearance: none;
  min-height: 36px;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--up-bd);
  background: var(--bg4);
}

label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 500
}

/* ── Sliders ── */
input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  border: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.08);
  outline: none;
  cursor: pointer;
  min-height: auto;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--up);
  border: 2px solid #000;
  cursor: pointer;
}

input[type=range]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--up);
  border: 2px solid #000;
  cursor: pointer;
}

/* ── Grid helpers ── */
.row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
  flex-wrap: wrap
}

.between {
  justify-content: space-between
}

.grid {
  display: grid;
  gap: 8px;
  margin-top: 8px
}

.grid-7 {
  grid-template-columns: repeat(7, 1fr)
}

.grid-2 {
  grid-template-columns: 1fr 1fr
}

.msg {
  font-size: 11px;
  color: var(--muted)
}

.msg.err {
  color: var(--dn)
}

.hidden {
  display: none
}

h2 {
  font-family: var(--ff-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .01em;
}

/* ── Preview row (bot creation) ── */
.preview {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 6px
}

.preview .p {
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--bg3);
  padding: 8px 10px;
}

.preview .p span {
  color: var(--muted);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.preview .p b {
  display: block;
  margin-top: 4px;
  font-family: var(--ff-mono);
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* ── Bot cards ── */
.bots {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 6px
}

@media (max-width: 1400px) {
  .bots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .bots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .bots { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════
   BOT CARD — Diseño A+C
   Barra lateral de color · tipografía IBM Plex
   Mono · grid de 4 métricas · barra de ROI
   · botones keycap
   ═══════════════════════════════════════════ */
.bot {
  display: grid;
  grid-template-columns: 3px 1fr;
  border: 1px solid var(--border2);
  border-radius: var(--r2);
  background: var(--bg3);
  overflow: hidden;
  transition: border-color .18s, background .18s, box-shadow .18s;
}
.bot:hover {
  border-color: rgba(255,255,255,.16);
  background: var(--bg4);
  box-shadow: 0 6px 24px rgba(0,0,0,.36);
}

/* ── Barra lateral de color (dirección) ── */
.bot-stripe {
  width: 3px;
  flex-shrink: 0;
}

/* ── Neutrals → sin shade ── */
.bot.bot-neutral .bot-stripe { background: var(--muted); }

/* ── Long → shade verde ── */
.bot.bot-long,
.bot.bot-mg-long {
  border-color: rgba(61,186,133,0.22);
  background: linear-gradient(135deg, rgba(61,186,133,0.08) 0%, var(--bg3) 60%);
}
.bot.bot-long .bot-stripe,
.bot.bot-mg-long .bot-stripe { background: var(--up); }
.bot.bot-long:hover,
.bot.bot-mg-long:hover {
  background: linear-gradient(135deg, rgba(61,186,133,0.13) 0%, var(--bg4) 60%);
}

/* ── Short → shade rojo ── */
.bot.bot-short,
.bot.bot-mg-short {
  border-color: rgba(217,92,110,0.22);
  background: linear-gradient(135deg, rgba(217,92,110,0.08) 0%, var(--bg3) 60%);
}
.bot.bot-short .bot-stripe,
.bot.bot-mg-short .bot-stripe { background: var(--dn); }
.bot.bot-short:hover,
.bot.bot-mg-short:hover {
  background: linear-gradient(135deg, rgba(217,92,110,0.13) 0%, var(--bg4) 60%);
}

/* ── Paused → amarillo ── */
.bot.bot-paused .bot-stripe { background: var(--warn); }

/* ── Inner wrapper ── */
.bot-inner { padding: 13px 14px 12px; }

/* ── Top row ── */
.bot .top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.bot-asset-block { display: flex; align-items: center; gap: 9px; }
.bot-asset {
  font-family: var(--ff-ibm, 'IBM Plex Mono', monospace);
  font-size: 16px; font-weight: 600; letter-spacing: -.01em;
}
.bot-tags { display: flex; gap: 4px; align-items: center; }
.bot-tag {
  font-family: var(--ff-ibm, 'IBM Plex Mono', monospace);
  font-size: 9px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 4px;
  background: var(--bg5); color: var(--muted); border: 1px solid var(--border2);
}
.bot-tag.long    { background: var(--up-bg);  color: var(--up);  border-color: var(--up-bd); }
.bot-tag.short   { background: var(--dn-bg);  color: var(--dn);  border-color: var(--dn-bd); }
.bot-tag.neutral { background: rgba(108,141,255,.07); color: var(--accent); border-color: rgba(108,141,255,.2); }
.bot-id {
  font-family: var(--ff-ibm, 'IBM Plex Mono', monospace);
  font-size: 9px; color: var(--dim); letter-spacing: .04em;
  margin-top: 2px;
}

/* ── Badge de estado ── */
.badge {
  font-family: var(--ff-ibm, 'IBM Plex Mono', monospace);
  font-size: 9px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 5px;
  display: inline-flex; align-items: center; gap: 5px;
  flex-shrink: 0;
}
.badge::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: currentColor; flex-shrink: 0;
}
.badge.run   { background: var(--up-bg); color: var(--up); border: 1px solid var(--up-bd); animation: badge-glow 2.5s ease infinite; }
.badge.pause { background: var(--warn-bg); color: var(--warn); border: 1px solid var(--warn-bd); }
.badge.stop  { background: rgba(255,255,255,.05); color: var(--muted); border: 1px solid var(--border2); }
@keyframes badge-glow {
  0%,100% { box-shadow: 0 0 0 0 rgba(61,186,133,0); }
  50%      { box-shadow: 0 0 10px rgba(61,186,133,.2); }
}

/* ── Metrics grid (4 celdas) ── */
.bot .meta {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  border-radius: 7px;
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 10px;
}
.meta-cell {
  background: var(--bg4);
  padding: 8px 10px;
}
.meta-label {
  font-family: var(--ff-ibm, 'IBM Plex Mono', monospace);
  font-size: 8px; font-weight: 500; text-transform: uppercase;
  letter-spacing: .1em; color: var(--dim); margin-bottom: 3px;
}
.meta-value {
  font-family: var(--ff-ibm, 'IBM Plex Mono', monospace);
  font-size: 13px; font-weight: 600; letter-spacing: -.01em;
  color: var(--text); font-variant-numeric: tabular-nums;
}
.meta-value.good { color: var(--up); }
.meta-value.bad  { color: var(--dn); }

/* ── ROI bar ── */
.bot-roi-row {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px;
}
.bot-roi-lbl {
  font-family: var(--ff-ibm, 'IBM Plex Mono', monospace);
  font-size: 9px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--dim); flex-shrink: 0; width: 24px;
}
.bot-roi-track {
  flex: 1; height: 3px; background: var(--bg5); border-radius: 2px; overflow: hidden;
}
.bot-roi-fill {
  height: 100%; border-radius: 2px;
  transition: width .5s cubic-bezier(.4,0,.2,1);
}
.bot-roi-fill.good { background: linear-gradient(90deg, var(--up), rgba(61,186,133,.35)); }
.bot-roi-fill.bad  { background: linear-gradient(90deg, var(--dn), rgba(217,92,110,.35)); }
.bot-roi-pct {
  font-family: var(--ff-ibm, 'IBM Plex Mono', monospace);
  font-size: 11px; font-weight: 600; flex-shrink: 0;
  width: 58px; text-align: right; letter-spacing: -.01em;
}
.bot-roi-pct.good { color: var(--up); }
.bot-roi-pct.bad  { color: var(--dn); }

/* ── Estimated liquidation row ── */
.bot-liq-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0 10px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01));
}
.bot-liq-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}
.bot-liq-label {
  font-family: var(--ff-ibm, 'IBM Plex Mono', monospace);
  font-size: 8px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--dim);
}
.bot-liq-value {
  font-family: var(--ff-ibm, 'IBM Plex Mono', monospace);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.bot-liq-sep {
  font-family: var(--ff-ibm, 'IBM Plex Mono', monospace);
  font-size: 13px;
  color: var(--muted);
  flex-shrink: 0;
}

/* ── Actions ── */
.bot .actions {
  display: flex; gap: 5px;
}

/* ── KPIs ── */
.kpis {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 8px
}

.kpi {
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--bg3);
  padding: 9px 11px;
}

.kpi .k {
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 3px;
}

.kpi .v {
  font-family: var(--ff-mono);
  font-size: 14px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* ── Log ── */
.log {
  color: rgba(200,220,255,0.75);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 9px 11px;
  overflow: auto;
  max-height: 180px;
  font-family: var(--ff-mono);
  font-size: 11px;
  line-height: 1.6;
}

/* ═══════════════════════════════════════════
   TRADING TAB — Pionex-like 3 columns
   ═══════════════════════════════════════════ */
#tab-trading {
  padding: 6px 8px;
  border: none;
  background: transparent
}

#tab-trading h2 {
  font-size: 12px;
  margin: 0
}

.pionex-layout {
  display: grid;
  /* Clamp side columns so the layout never forces horizontal scrolling */
  grid-template-columns: minmax(240px, 1fr) 200px minmax(280px, 320px);
  gap: 1px;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 300px;
  overflow-x: hidden;
}


/* ── Terminal bottom panel ── */
.terminal-panel {
  background: rgba(10, 10, 10, 0.92);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-top: 1px;
  height: 218px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.tp-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  overflow-x: auto
}

.tp-tab {
  background: none;
  border: none;
  color: var(--muted);
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.tp-tab:hover {
  color: var(--text)
}

.tp-tab.active {
  color: var(--text);
  border-bottom-color: var(--accent)
}

.tp-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: auto;
  padding: 0;
  -webkit-overflow-scrolling: touch
}

.tp-pane {
  height: 100%;
  overflow-y: auto;
  overflow-x: auto
}

.tp-orders-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(10, 10, 10, 0.96);
  z-index: 2
}

.tp-orders-toolbar input {
  width: min(320px, 100%);
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  padding: 0 10px;
  font-size: 12px
}

.tp-orders-toolbar input:focus {
  outline: none;
  border-color: rgba(64, 156, 255, 0.7)
}

.tp-orders-count {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap
}

.tp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  min-width: 500px
}

.tp-table thead {
  position: sticky;
  top: 0;
  background: rgba(10, 10, 10, 0.95);
  z-index: 1
}

.tp-table th {
  text-align: left;
  padding: 4px 8px;
  color: var(--muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  white-space: nowrap
}

.tp-table td {
  padding: 3px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  white-space: nowrap
}

.tp-table .side-long {
  color: var(--green)
}

.tp-table .side-short {
  color: var(--red)
}

.tp-table .pnl-pos {
  color: var(--green)
}

.tp-table .pnl-neg {
  color: var(--red)
}

.tp-table .btn-cancel {
  background: none;
  border: 1px solid var(--red);
  color: var(--red);
  padding: 4px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 11px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent
}

.tp-table .btn-cancel:hover {
  background: var(--red);
  color: #fff
}

.tp-empty {
  text-align: center;
  color: var(--muted);
  padding: 30px 0;
  font-size: 12px
}

.p-col {
  background: rgba(10, 10, 10, 0.9);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* visually fuse columns (chart|ob|sidebar) */
.chart-col {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0
}

.ob-col {
  border-radius: 0;
  border-left: 0;
  border-right: 0
}

.side-col {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0
}

/* Chart column */
.chart-col {
  min-width: 0
}

.chart-col .chart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 6px;
  font-size: 11px;
  color: var(--muted)
}

#tv_chart {
  flex: 1;
  min-height: 300px
}

#tab-pnl canvas {
  min-height: 110px;
  background: var(--bg3);
}

/* Orderbook column */
.ob-col {
  padding: 0;
  display: flex;
  flex-direction: column
}

.ob-head {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  padding: 5px 6px;
  border-bottom: 1px solid var(--border)
}

.ob-asks,
.ob-bids {
  font-size: 11px;
  flex: 1;
  overflow-y: auto;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums
}

.ob-asks {
  display: flex;
  flex-direction: column;
  justify-content: flex-end
}

.ob-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 4px;
  padding: 2px 6px;
  font-size: 11px;
  line-height: 1.6
}

.ob-row:hover {
  background: rgba(255, 255, 255, 0.03)
}

.ob-row .px {
  font-weight: 600
}

.ob-row.ask .px {
  color: var(--dn)
}

.ob-row.bid .px {
  color: var(--up)
}

.ob-mid {
  padding: 6px;
  margin: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-weight: 800;
  font-size: 14px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

#ob-book {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden
}

/* Sidebar column */
.side-col {
  display: flex;
  flex-direction: column;
  overflow-y: auto
}

.side-tabs {
  display: flex;
  border-bottom: 1px solid var(--border)
}

.side-tab {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 8px 4px;
  cursor: pointer;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .01em;
  border-bottom: 2px solid transparent;
  transition: background .15s, color .15s, border-color .15s, opacity .15s;
  -webkit-tap-highlight-color: transparent;
}

.side-tab.active {
  color: var(--up);
  border-bottom-color: var(--up)
}

.side-panel {
  padding: 8px;
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch
}

/* Futures Bot sub-tabs */
.fb-tabs {
  display: flex;
  gap: 6px;
  padding: 6px 0 0
}

.fb-tab {
  flex: 1;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  padding: 8px 8px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  -webkit-tap-highlight-color: transparent;
}

.fb-tab.active {
  color: var(--up);
  border-color: rgba(61,186,133, 0.3);
  background: rgba(61,186,133, 0.10)
}

/* Account balance bar in Manual */
.acct-bar {
  display: flex;
  gap: 12px;
  padding: 6px 8px;
  margin-bottom: 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(13, 13, 20, 0.45);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  flex-wrap: wrap;
}

.acct-bar .lbl {
  color: var(--muted);
  font-weight: 500
}

.acct-bar .val {
  color: var(--text);
  font-weight: 700;
  margin-left: 4px
}

/* Slider row */
.slider-row {
  display: flex;
  align-items: center;
  gap: 6px
}

.slider-row input[type=range] {
  flex: 1
}

.slider-row .sv {
  font-size: 11px;
  font-weight: 600;
  min-width: 60px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--text)
}


#mSizeSlider {
  touch-action: pan-y;
}

#mSizeSlider::-webkit-slider-thumb {
  width: 24px;
  height: 24px;
}

#mSizeSlider::-moz-range-thumb {
  width: 24px;
  height: 24px;
}

/* Buy/Sell buttons pro */
.btn-buy {
  flex: 1;
  padding: 10px;
  border-radius: var(--r);
  border: 1px solid var(--up-bd);
  background: var(--up-bg);
  color: var(--up);
  font-family: var(--ff-body);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: background .15s, box-shadow .15s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  min-height: 42px;
}

.btn-buy:hover {
  background: rgba(61,186,133,0.16);
  box-shadow: 0 0 0 1px var(--up-bd);
}

.btn-buy:active {
  background: rgba(61,186,133,0.22);
}

.btn-sell {
  flex: 1;
  padding: 10px;
  border-radius: var(--r);
  border: 1px solid var(--dn-bd);
  background: var(--dn-bg);
  color: var(--dn);
  font-family: var(--ff-body);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: background .15s, box-shadow .15s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  min-height: 42px;
}

.btn-sell:hover {
  background: rgba(217,92,110,0.16);
  box-shadow: 0 0 0 1px var(--dn-bd);
}

.btn-sell:active {
  background: rgba(217,92,110,0.22);
}

/* ═══════════════════════════════════════
   RESPONSIVE — Tablet
   ═══════════════════════════════════════ */
@media(max-width:1100px) {
  .pionex-layout {
    grid-template-columns: 1fr 190px 260px;
    height: auto;
    min-height: 50vh
  }

  .terminal-panel {
    height: 180px
  }
}

/* ═══════════════════════════════════════
   RESPONSIVE — Mobile (<900px)
   ═══════════════════════════════════════ */
@media(max-width:900px) {
  html {
    font-size: 14px
  }

  header {
    padding: 8px 10px
  }

  header h1 {
    font-size: 14px
  }

  .sub {
    font-size: 10px
  }

  /* Stack 3 columns vertically */
  .pionex-layout {
    grid-template-columns: 1fr;
    height: auto;
    gap: 4px;
  }

  .p-col {
    min-height: auto;
    border-radius: 6px !important
  }

  /* Chart: fixed height, full width */
  .chart-col {
    order: 1
  }

  #tv_chart {
    height: 300px;
    flex: none
  }

  /* Orderbook: horizontal compact, fixed height */
  .ob-col {
    order: 2;
    max-height: 200px
  }

  /* Sidebar: natural flow */
  .side-col {
    order: 3;
    max-height: none;
    overflow-y: visible
  }

  .side-panel {
    padding: 10px
  }

  /* Terminal panel */
  .terminal-panel {
    height: 200px;
    border-radius: 6px
  }

  .tp-table {
    font-size: 10px;
    min-width: 420px
  }

  .tp-table th,
  .tp-table td {
    padding: 3px 6px
  }

  .tp-tab {
    padding: 8px 12px;
    font-size: 11px
  }

  /* Grids: 2 cols max */
  .grid-7 {
    grid-template-columns: repeat(2, 1fr)
  }

  .grid-2 {
    grid-template-columns: 1fr 1fr
  }

  .preview {
    grid-template-columns: repeat(2, 1fr)
  }

  .kpis {
    grid-template-columns: 1fr
  }

  /* Bigger touch targets */
  .btn {
    padding: 8px 14px;
    font-size: 12px;
    min-height: 40px
  }

  .btn-buy,
  .btn-sell {
    min-height: 48px;
    font-size: 14px
  }

  input,
  select {
    min-height: 40px;
    font-size: 14px;
    padding: 8px 10px
  }

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

  .side-tab {
    padding: 10px 4px;
    font-size: 12px
  }
}

/* ═══════════════════════════════════════
   RESPONSIVE — Small phone (<480px)
   ═══════════════════════════════════════ */
@media(max-width:480px) {
  header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px
  }

  .right {
    width: 100%;
    justify-content: space-between
  }

  .tabs {
    padding: 0 6px
  }

  .tab {
    padding: 10px 10px;
    font-size: 11px
  }

  #tv_chart {
    height: 240px
  }

  .ob-col {
    max-height: 160px
  }

  .grid-2 {
    grid-template-columns: 1fr
  }

  .preview {
    grid-template-columns: 1fr 1fr
  }

  .terminal-panel {
    height: 180px
  }

  .tp-table {
    min-width: 360px
  }

  .card {
    padding: 8px
  }

  .side-panel {
    padding: 6px
  }

  .bot .meta {
    font-size: 11px;
    gap: 8px
  }

  .bot .actions {
    gap: 4px
  }

  .bot .actions .btn {
    flex: 1;
    text-align: center
  }
}

/* ═══════════════════════════════════════
   SAFE AREA (notch phones)
   ═══════════════════════════════════════ */
@supports(padding: env(safe-area-inset-bottom)) {
  body {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* ═══════════════════════════════════════════
   BOT SELECTION CARDS (Elegir Bot)
   ═══════════════════════════════════════════ */
.bot-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.bot-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 20px;
  cursor: pointer;
  transition: border-color .18s, box-shadow .18s;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.bot-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--up) 0%, transparent 70%);
  opacity: 0;
  transition: opacity .2s;
}

.bot-card:hover {
  border-color: var(--up-bd);
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
}

.bot-card:hover::after {
  opacity: .8;
}

.bot-card.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.bot-card.disabled:hover {
  border-color: rgba(255, 255, 255, 0.08);
  transform: none;
  box-shadow: none;
}

.bot-card .bot-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bg4);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.bot-card .bot-name {
  font-family: var(--ff-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.bot-card .bot-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  flex: 1;
}

.bot-card .bot-status {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 99px;
  display: inline-block;
  width: fit-content;
  margin-top: 8px;
}

.bot-status.disponible {
  background: rgba(61,186,133, 0.15);
  color: #3dba85;
}

.bot-status.soon {
  background: rgba(255, 159, 10, 0.15);
  color: var(--warn);
}

.bot-config-form {
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.coming-soon-msg {
  text-align: center;
  padding: 40px 20px;
}

.coming-soon-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

/* ═══════════════════════════════════════════
   BOT DETAIL: Pending orders book (Pionex-ish)
   ═══════════════════════════════════════════ */
.pend-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 12px;
}

.pend-bar {
  display: flex;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  margin: 10px 2px 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.pend-bar .g {
  flex: 1;
  background: linear-gradient(90deg, rgba(61,186,133, 0.9), rgba(61,186,133, 0.35));
}

.pend-bar .r {
  flex: 1;
  background: linear-gradient(90deg, rgba(255, 69, 58, 0.35), rgba(255, 69, 58, 0.9));
}

.pend-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start
}

/* (mid column removed; keep layout full-width) */
.pend-col {
  min-width: 0
}

.pend-col-head {
  display: grid;
  grid-template-columns: 1fr 72px 64px;
  gap: 10px;
  color: rgba(255, 255, 255, 0.35);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin: 0 0 6px
}

.pend-col-head.right {
  text-align: right
}

.pend-col-head.right span {
  text-align: right
}

.pend-row {
  display: grid;
  grid-template-columns: 22px 1fr 72px 64px;
  gap: 10px;
  align-items: center;
  padding: 4px 0;
  font-family: var(--mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.pend-badge {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  color: #000;
}

.pend-badge.buy {
  background: rgba(61,186,133, 0.9)
}

.pend-badge.sell {
  background: rgba(255, 69, 58, 0.9);
  color: #fff
}

.pend-buy .pend-px {
  color: #3dba85;
  font-weight: 800
}

.pend-sell .pend-px {
  color: var(--dn);
  font-weight: 800;
  text-align: right
}

.pend-dist {
  color: rgba(255, 255, 255, 0.45);
  text-align: center
}

.pend-sz {
  color: rgba(255, 255, 255, 0.55);
  text-align: right
}

@media (max-width:700px) {
  .pend-cols {
    grid-template-columns: 1fr;
  }
}


/* ── Bot card action buttons (keycap style) ── */
.bot .actions .btn {
  font-family: var(--ff-ibm, 'IBM Plex Mono', monospace) !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  letter-spacing: .04em !important;
  text-transform: uppercase !important;
  padding: 8px 10px !important;
  border-radius: 7px !important;
  box-shadow: 0 2px 0 rgba(0,0,0,.6) !important;
  transition: all .12s !important;
}
.bot .actions .btn:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 3px 0 rgba(0,0,0,.6) !important;
}
.bot .actions .btn:active {
  transform: translateY(1px) !important;
  box-shadow: 0 1px 0 rgba(0,0,0,.6) !important;
}

.btn-stop-close {
  background: rgba(255, 69, 58, 0.08) !important;
  border: 1px solid rgba(255, 69, 58, 0.3) !important;
  color: var(--dn) !important;
}
.btn-stop-close:hover { background: rgba(255, 69, 58, 0.16) !important; }

.btn-pause {
  background: rgba(255, 159, 10, 0.08) !important;
  border: 1px solid rgba(255, 159, 10, 0.3) !important;
  color: var(--warn) !important;
}
.btn-pause:hover { background: rgba(255, 159, 10, 0.16) !important; }

.btn-resume {
  background: rgba(61,186,133, 0.08) !important;
  border: 1px solid rgba(61,186,133, 0.3) !important;
  color: var(--up) !important;
  flex: 2 !important;
}
.btn-resume:hover { background: rgba(61,186,133, 0.16) !important; }

.btn-detail {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  flex: 0 0 auto !important;
}

.btn-delete {
  background: transparent !important;
  border: 1px solid rgba(255, 69, 58, 0.2) !important;
  color: rgba(255, 69, 58, 0.7) !important;
  flex: 0 0 auto !important;
  padding: 8px 12px !important;
}
.btn-delete:hover {
  background: rgba(255, 69, 58, 0.1) !important;
  color: var(--dn) !important;
}

/* ═══════════════════════════════════════════
   APP HIDDEN (when landing is visible)
   ═══════════════════════════════════════════ */
.app-hidden {
  display: none !important;
}

/* ═══════════════════════════════════════════════════════════════
   LANDING PAGE — MyLiquidBot
   Futuristic, clean, professional design for crypto traders
   ═══════════════════════════════════════════════════════════════ */

#landing {
  font-family: var(--ff-body);
  color: var(--text);
  overflow-x: hidden;
}

/* ── Container ── */
.land-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ═══ NAVBAR ═══ */
.land-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(0, 0, 0, 0.65);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.3s;
}

.land-nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: calc(60px + env(safe-area-inset-bottom, 0px));
}

.land-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--ff-display);
  text-decoration: none;
}

.land-logo-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--bg4);
  border: 1px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.land-logo-text {
  font-family: var(--ff-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .01em;
  background: linear-gradient(135deg, #fff 30%, rgba(61,186,133, 0.8));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.land-nav-links {
  display: flex;
  gap: 28px;
}

.land-nav-links a {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.2s;
  letter-spacing: 0.01em;
}

.land-nav-links a:hover {
  color: #fff;
}

.land-nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.land-btn-login {
  border: 1px solid rgba(61,186,133, 0.35);
  background: rgba(61,186,133, 0.10);
  color: #3dba85;
  padding: 8px 18px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
  font-family: var(--ff-body);
  transition: all 0.2s;
}

.land-btn-login:hover {
  background: rgba(61,186,133, 0.18);
  border-color: rgba(61,186,133, 0.5);
}

.land-mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.land-mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 2px;
  transition: all 0.25s;
}

/* ═══ HERO ═══ */
.land-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 100px 24px 60px;
}

.land-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 40%, rgba(61,186,133,0.07) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 72% 58%, rgba(108,141,255,0.05) 0%, transparent 60%),
    radial-gradient(ellipse 35% 35% at 20% 70%, rgba(146,120,224,0.04) 0%, transparent 50%);
  will-change: opacity;
  animation: heroGlow 10s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  from { opacity: 1; }
  to   { opacity: 0.65; }
}

.land-hero-grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 20%, transparent 70%);
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .land-hero-bg { animation: none !important; }
}

.land-hero-content {
  position: relative;
  text-align: center;
  max-width: 720px;
}

.land-hero-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 28px;
  letter-spacing: 0.02em;
}

.land-hero-title {
  font-family: var(--ff-display);
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 20px;
  color: #fff;
}

.land-gradient-text {
  background: linear-gradient(135deg, #3dba85 0%, #6c8dff 60%, #9278e0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.land-hero-sub {
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.52);
  margin: 0 auto 36px;
  max-width: 520px;
}

.land-hero-sub strong {
  color: rgba(255, 255, 255, 0.8);
}

.land-hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Primary button ── */
.land-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #3dba85 0%, #2f9a6d 100%);
  color: #000;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--ff-body);
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 20px rgba(61,186,133, 0.25);
}

.land-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(61,186,133, 0.35);
}

.land-btn-primary:active {
  transform: translateY(0);
}

.land-btn-lg {
  padding: 16px 36px;
  font-size: 16px;
  border-radius: 14px;
}

.land-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.85);
  font-size: 15px;
  font-weight: 600;
  font-family: var(--ff-body);
  cursor: pointer;
  transition: all 0.2s;
}

.land-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.land-btn-telegram {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 12px;
  border: 1px solid var(--acc-bd);
  background: var(--acc-bg);
  color: var(--accent);
  font-size: 15px;
  font-weight: 600;
  font-family: var(--ff-body);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.land-btn-telegram:hover {
  background: rgba(108, 141, 255, 0.15);
  border-color: rgba(108, 141, 255, 0.40);
}

/* ── Trust badges ── */
.land-hero-trust {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.land-trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.02em;
}

.land-trust-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.land-trust-dot.green {
  background: #3dba85;
  box-shadow: 0 0 8px rgba(61,186,133, 0.5);
}

.land-trust-dot.blue {
  background: var(--accent);
  box-shadow: 0 0 8px rgba(108, 141, 255, 0.5);
}

.land-trust-dot.purple {
  background: var(--purple);
  box-shadow: 0 0 8px rgba(146, 120, 224, 0.5);
}

/* ═══ SECTIONS ═══ */
.land-section {
  padding: 100px 0;
}

.land-section-dark {
  background: rgba(255, 255, 255, 0.015);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.land-section-header {
  text-align: center;
  margin-bottom: 56px;
}

.land-section-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #3dba85;
  padding: 5px 14px;
  border-radius: 99px;
  border: 1px solid rgba(61,186,133, 0.2);
  background: rgba(61,186,133, 0.06);
  margin-bottom: 18px;
}

.land-section-title {
  font-family: var(--ff-display);
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  color: #fff;
}

.land-section-sub {
  font-size: 14.5px;
  color: var(--muted);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.65;
}

/* ═══ FEATURES GRID ═══ */
.land-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.land-feature-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 26px 22px;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}

.land-feature-card:hover {
  border-color: var(--border2);
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(0,0,0,.35);
}

.land-feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--bg4);
  border: 1px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 0 18px var(--glow-color, transparent);
  transition: box-shadow .3s;
}

.land-feature-card:hover .land-feature-icon {
  box-shadow: 0 0 28px var(--glow-color, transparent);
}

.land-feature-card h3 {
  font-family: var(--ff-display);
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 8px;
  color: #fff;
}

.land-feature-card p {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.45);
  margin: 0;
}

/* ═══ HOW IT WORKS (STEPS) ═══ */
.land-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  position: relative;
}

.land-step {
  text-align: center;
  padding: 0 24px;
  position: relative;
}

.land-step-num {
  font-size: 42px;
  font-weight: 900;
  letter-spacing: -0.04em;
  background: linear-gradient(180deg, rgba(61,186,133, 0.4) 0%, rgba(61,186,133, 0.05) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}

.land-step-line {
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(61,186,133, 0.3), transparent);
  margin: 0 auto 20px;
}

.land-step h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 10px;
  color: #fff;
}

.land-step p {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.45);
  margin: 0;
  max-width: 260px;
  margin-left: auto;
  margin-right: auto;
}

/* ═══ STATS ═══ */
.land-stats-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 0;
  padding: 40px 32px;
  background: linear-gradient(180deg, rgba(20, 20, 22, 0.95) 0%, rgba(12, 12, 14, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  backdrop-filter: blur(12px);
}

.land-stat {
  text-align: center;
  padding: 0 16px;
}

.land-stat-value {
  font-family: var(--ff-display);
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
  line-height: 1;
  margin-bottom: 6px;
}

.land-stat-label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 4px;
}

.land-stat-sub {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
}

.land-stat-divider {
  width: 1px;
  height: 50px;
  background: rgba(255, 255, 255, 0.06);
}

/* ═══ BOTS SHOWCASE ═══ */
.land-bots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.land-bot-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 26px 22px;
  position: relative;
  transition: border-color .2s, box-shadow .2s, transform .2s;
  overflow: hidden;
}

.land-bot-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
  transition: opacity .3s;
}

.land-bot-active {
  cursor: pointer;
  border-color: var(--up-bd);
}

.land-bot-active::before {
  background: linear-gradient(90deg, transparent, rgba(61,186,133,0.45), transparent);
}

.land-bot-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(0,0,0,.3);
}

.land-bot-active:hover {
  border-color: rgba(61,186,133, 0.35);
  box-shadow: 0 10px 32px rgba(61,186,133, 0.08);
}

.land-bot-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 12px;
  border-radius: 99px;
}

.land-bot-badge.available {
  background: rgba(61,186,133, 0.12);
  color: #3dba85;
  border: 1px solid rgba(61,186,133, 0.25);
}

.land-bot-badge.coming {
  background: rgba(255, 159, 10, 0.12);
  color: var(--warn);
  border: 1px solid rgba(255, 159, 10, 0.25);
}

.land-bot-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--bg4);
  border: 1px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.land-bot-card h3 {
  font-family: var(--ff-display);
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 10px;
  color: #fff;
}

.land-bot-card p {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.42);
  margin: 0 0 16px;
}

.land-bot-features {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
}

.land-bot-features li {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  padding: 5px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  gap: 8px;
}

.land-bot-features li::before {
  content: '→';
  color: rgba(61,186,133, 0.6);
  font-weight: 700;
  font-size: 11px;
}

.land-bot-cta {
  font-size: 13px;
  font-weight: 700;
  color: #3dba85;
  transition: color 0.2s;
}

.land-bot-active:hover .land-bot-cta {
  color: #4de070;
}

/* ═══ PRICING ═══ */
.land-pricing-card {
  max-width: 440px;
  margin: 0 auto;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(61,186,133,0.08), 0 20px 60px rgba(0,0,0,0.4);
}

.land-pricing-header {
  padding: 30px 26px 22px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(61,186,133,0.04) 0%, transparent 100%);
}

.land-pricing-price {
  font-family: var(--ff-display);
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, #3dba85, #6c8dff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.land-pricing-period {
  font-size: 12.5px;
  font-family: var(--ff-mono);
  color: var(--muted);
  margin-top: 6px;
  letter-spacing: .02em;
}

.land-pricing-body {
  padding: 24px 28px;
}

.land-pricing-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  font-size: 13.5px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.land-pricing-check {
  color: #3dba85;
  font-weight: 700;
  font-size: 15px;
}

.land-pricing-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 16px 0;
}

.land-pricing-fee {
  text-align: center;
}

.land-pricing-fee-title {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.land-pricing-fee-detail {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
}

.land-pricing-fee-detail span {
  color: rgba(255, 255, 255, 0.5);
}

.land-pricing-fee-detail strong {
  color: #fff;
  font-weight: 700;
}

/* ═══ CTA SECTION ═══ */
.land-cta-section {
  position: relative;
  padding: 100px 0;
  text-align: center;
  overflow: hidden;
}

.land-cta-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 50% 50%, rgba(61,186,133, 0.06) 0%, transparent 65%),
    radial-gradient(ellipse 40% 50% at 30% 40%, rgba(108, 141, 255, 0.04) 0%, transparent 50%);
}

.land-cta-title {
  font-family: var(--ff-display);
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
  color: #fff;
  position: relative;
}

.land-cta-sub {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.45);
  margin: 0 0 32px;
  position: relative;
}

.land-cta-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}

/* ═══ FOOTER ═══ */
.land-footer {
  border-top: 1px solid var(--border);
  padding: 52px 0 30px;
  background: rgba(7,7,11,0.6);
}

.land-footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
}

.land-footer-brand {
  flex-shrink: 0;
  max-width: 220px;
}

.land-footer-desc {
  font-size: 12px;
  color: var(--dim);
  margin: 10px 0 0;
  line-height: 1.6;
}

.land-footer-links {
  display: flex;
  gap: 60px;
}

.land-footer-col {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.land-footer-col h4 {
  font-family: var(--ff-display);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 0 0 4px;
}

.land-footer-col a {
  color: var(--dim);
  text-decoration: none;
  font-size: 12.5px;
  transition: color 0.15s;
}

.land-footer-col a:hover {
  color: var(--text);
}

.land-footer-bottom {
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 11.5px;
  font-family: var(--ff-mono);
  color: var(--dim);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* ═══ SCROLL ANIMATIONS ═══ */
.land-anim {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s cubic-bezier(0.22,1,0.36,1), transform 0.55s cubic-bezier(0.22,1,0.36,1);
  will-change: opacity, transform;
}

.land-anim.land-visible {
  opacity: 1;
  transform: translateY(0);
  will-change: auto;
}

@media (prefers-reduced-motion: reduce) {
  .land-anim {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

.land-features-grid .land-anim:nth-child(2) {
  transition-delay: 0.08s;
}

.land-features-grid .land-anim:nth-child(3) {
  transition-delay: 0.16s;
}

.land-features-grid .land-anim:nth-child(4) {
  transition-delay: 0.24s;
}

.land-features-grid .land-anim:nth-child(5) {
  transition-delay: 0.32s;
}

.land-features-grid .land-anim:nth-child(6) {
  transition-delay: 0.40s;
}

.land-steps .land-anim:nth-child(2) {
  transition-delay: 0.12s;
}

.land-steps .land-anim:nth-child(3) {
  transition-delay: 0.24s;
}

.land-bots-grid .land-anim:nth-child(2) {
  transition-delay: 0.10s;
}

.land-bots-grid .land-anim:nth-child(3) {
  transition-delay: 0.20s;
}

/* ═══ LANDING RESPONSIVE — Tablet ═══ */
@media (max-width: 900px) {
  .land-nav-links {
    display: none;
  }

  .land-mobile-toggle {
    display: flex;
  }

  .land-nav.open .land-nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(20px);
    padding: 16px 24px;
    gap: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .land-nav.open .land-nav-links a {
    font-size: 15px;
  }

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

  .land-steps {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .land-stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    padding: 32px 24px;
  }

  .land-stat-divider {
    display: none;
  }

  .land-bots-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

  .land-footer-top {
    flex-direction: column;
  }
}

/* ═══ LANDING RESPONSIVE — Mobile ═══ */
@media (max-width: 540px) {
  .land-hero {
    padding: 90px 20px 50px;
    min-height: 90vh;
  }

  .land-hero-title {
    font-size: 32px;
  }

  .land-nav-right .pill-group {
    display: none;
  }

  .land-features-grid {
    grid-template-columns: 1fr;
  }

  .land-feature-card {
    padding: 22px 20px;
  }

  .land-stats-row {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 28px 20px;
  }

  .land-section {
    padding: 64px 0;
  }

  .land-hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .land-btn-primary,
  .land-btn-secondary,
  .land-btn-telegram {
    width: 100%;
    justify-content: center;
    max-width: 280px;
  }

  .land-cta-actions {
    flex-direction: column;
    align-items: center;
  }

  .land-footer-links {
    flex-direction: column;
    gap: 24px;
  }

  .land-pricing-card {
    margin: 0 8px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   HOME BUTTON (in app header)
   ═══════════════════════════════════════════════════════════════ */
.btn-home {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0 !important;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.btn-home:hover {
  background: rgba(61,186,133, 0.1);
  border-color: rgba(61,186,133, 0.3);
}

.btn-home:hover svg {
  stroke: #3dba85;
}

.btn-home-sm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

/* ═══════════════════════════════════════════════════════════════
   CUENTA TAB — Professional card-based redesign
   ═══════════════════════════════════════════════════════════════ */
#tab-cuenta {
  border: none;
  background: transparent;
  padding: 0;
}

.cuenta-wrap {
  padding: 16px 12px;
  width: 100%;
  max-width: none;
  margin: 0;
}

/* Header */
.cuenta-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  gap: 12px;
  flex-wrap: wrap;
}

.cuenta-header-left {}

.cuenta-title {
  font-size: 20px !important;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 !important;
}

.cuenta-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  margin: 4px 0 0;
}

.cuenta-header-right {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Cards Grid */
.cuenta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

/* Asset select (match theme) */
.asset-select{
  width: 100%;
  margin-top: 6px;
  text-transform: uppercase;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  color: var(--text);
  border-radius: 10px;
  color-scheme: dark;
}
.asset-select:focus{
  outline: none;
  border-color: rgba(108,141,255,0.55);
  box-shadow: 0 0 0 3px rgba(108,141,255,0.18);
}
.asset-select option{
  background: #121219;
  color: var(--text);
}

.asset-picker-tools{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-top:6px;
}
.asset-type-toggle{ display:flex; gap:6px; }
.asset-type-btn{
  flex:1;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
  color: var(--muted);
  border-radius: 9px;
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.asset-type-btn.active{
  color: var(--up);
  border-color: var(--up-bd);
  background: var(--up-bg);
}
.asset-search-input{
  width:100%;
  text-transform: uppercase;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  color: var(--text);
  border-radius: 10px;
  padding: 9px 10px;
}
.asset-search-input:focus{
  outline:none;
  border-color: rgba(108,141,255,0.55);
  box-shadow: 0 0 0 3px rgba(108,141,255,0.18);
}
.asset-picker-actions{
  display:flex;
  justify-content:flex-end;
}
.asset-list-toggle{
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
  color: var(--muted);
  border-radius: 9px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.asset-list-toggle:hover{
  border-color: rgba(108,141,255,0.55);
  color: var(--text);
}
.asset-collateral-hint{
  font-size: 11px;
  color: var(--muted);
  line-height: 1.35;
}
.asset-collateral-hint.warn{
  color: #ffb78e;
}
.asset-select.asset-select-open{
  min-height: 130px;
}

/* Individual Card */
.cuenta-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 20px;
  transition: border-color .2s, box-shadow .2s;
  position: relative;
  overflow: hidden;
}

.cuenta-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 10%, rgba(255,255,255,0.05) 50%, transparent 90%);
}

.cuenta-card:hover {
  border-color: var(--border2);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}

/* Card Icon */
.cuenta-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bg4);
  border: 1px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  box-shadow: 0 0 14px var(--card-accent, transparent);
}

/* Card Titles */
.cuenta-card h3 {
  font-family: var(--ff-display);
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--text);
}

.cuenta-card-desc {
  font-size: 12px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.4);
  margin: 0 0 14px;
}

/* Card Actions */
.cuenta-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.cuenta-card-actions .btn {
  font-size: 12px;
}

/* Card Input Row */
.cuenta-card-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.cuenta-card-input-row input {
  flex: 1;
  font-size: 13px;
  padding: 8px 12px;
  min-height: 38px;
}

.cuenta-card-input-row .btn {
  flex-shrink: 0;
}

/* Card Status */
.cuenta-card-status {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 8px;
  min-height: 14px;
  white-space: pre-wrap;
}

/* Card Hint */
.cuenta-card-hint {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  line-height: 1.5;
}

/* Hyperliquid button */
.cuenta-btn-hl {
  background: rgba(108,141,255,0.08) !important;
  border-color: rgba(108,141,255,0.25) !important;
  color: var(--accent) !important;
}

.cuenta-btn-hl:hover {
  background: rgba(108,141,255,0.14) !important;
}

/* Telegram button */
.cuenta-btn-tg {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  background: rgba(108,141,255,0.06) !important;
  border-color: rgba(108,141,255,0.2) !important;
  color: var(--accent) !important;
  text-decoration: none;
}

.cuenta-btn-tg:hover {
  background: rgba(108,141,255,0.12) !important;
}

.cuenta-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(108, 141, 255, 0.2);
  background: rgba(108, 141, 255, 0.06);
  border-radius: 10px;
  padding: 12px;
}

.cuenta-setting-meta {
  min-width: 0;
}

.cuenta-setting-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.5);
}

.cuenta-setting-value {
  margin-top: 3px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.cuenta-btn-lang {
  white-space: nowrap;
}

/* Fee Grid */
.cuenta-card-fee-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0;
}

.cuenta-fee-item {
  background: rgba(13, 13, 20, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 10px;
  text-align: center;
}

.cuenta-fee-item span {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.cuenta-fee-item strong {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}

/* Terms body */
.cuenta-card-terms-body {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
  line-height: 1.6;
  max-height: 120px;
  overflow-y: auto;
  padding: 10px;
  border-radius: 8px;
  background: rgba(13, 13, 20, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.04);
  margin-top: 8px;
  white-space: pre-wrap;
}

/* ═══ CUENTA RESPONSIVE ═══ */
@media (max-width: 1400px) {
  .cuenta-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1050px) {
  .cuenta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .cuenta-card {
    padding: 18px 16px;
  }

  .cuenta-card-fee-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .cuenta-header {
    flex-direction: column;
  }

  .cuenta-setting-row {
    flex-direction: column;
    align-items: stretch;
  }

  .cuenta-btn-lang {
    width: 100%;
  }
}
/* Trading tab: prevent inner horizontal scroll; allow vertical scroll in side panel */
.pionex-layout .p-col{ min-width:0; }
.side-col{ min-width:0; max-width:100%; }
.side-panel{ overflow:visible; }
.side-panel .grid{ min-width:0; }
.side-panel label{ min-width:0; }
.side-panel input, .side-panel select{ max-width:100%; }

@media (max-width: 1100px){
  .pionex-layout{ grid-template-columns: minmax(220px, 1fr) 180px minmax(260px, 300px); }
}

@media (max-width: 920px){
  .pionex-layout{ grid-template-columns: 1fr; height: auto; }
  .terminal-panel{ height: 240px; }
}

/* ═══════════════════════════════════════════════════════════
   NEW BOT CREATOR — Premium 3-column UI
   Prefix: nb-
   ═══════════════════════════════════════════════════════════ */

/* ── Top bar ── */
.nb-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.nb-back-btn {
  display: flex; align-items: center; gap: 6px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 9px;
  padding: 8px 16px;
  color: var(--muted);
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  transition: color .2s, border-color .2s;
}
.nb-back-btn:hover { color: var(--text); border-color: rgba(255,255,255,0.18); }
.nb-breadcrumb { font-size: 13px; color: var(--muted); }
.nb-breadcrumb strong { color: var(--up); }

/* ── Bot type tabs ── */
.nb-tabs {
  display: flex; gap: 6px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 16px;
  padding: 5px;
  margin-bottom: 18px;
  width: fit-content;
}
.nb-tab {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 22px;
  border-radius: 11px; border: none;
  background: transparent;
  color: var(--muted);
  font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .2s;
}
.nb-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: currentColor; opacity: 0; transition: opacity .2s;
}
.nb-tab:hover { color: rgba(255,255,255,0.6); }
.nb-tab.active { background: var(--up-bg); color: var(--up); box-shadow: 0 0 0 1px var(--up-bd) inset; }
.nb-tab.active .nb-dot { opacity: 1; }
.nb-tab.tab-mart.active { background: var(--dn-bg); color: var(--dn); box-shadow: 0 0 0 1px var(--dn-bd) inset; }
.nb-tab.tab-gmart.active { background: rgba(146,120,224,.1); color: var(--purple); box-shadow: 0 0 0 1px rgba(146,120,224,.25) inset; }

/* ── 3-column split ── */
.nb-split {
  display: grid;
  grid-template-columns: 272px 1fr 292px;
  gap: 14px;
  align-items: start;
}

/* ══════════════════════
   COL 1: Market Panel
══════════════════════ */
.nb-market-panel {
  display: flex; flex-direction: column; gap: 12px;
  position: sticky; top: 16px;
}
.nb-mp-card, .nb-ob-card {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 16px; overflow: hidden;
  position: relative;
}
.nb-mp-card::after {
  content: ''; position: absolute;
  right: 0; top: 20%; bottom: 20%; width: 2px;
  background: var(--up); border-radius: 2px; opacity: .2;
}

/* Price header */
.nb-mp-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border);
}
.nb-asset-row { display: flex; align-items: center; gap: 9px; }
.nb-asset-icon {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, #f7931a, #ff6b00);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; color: #fff;
  font-family: 'IBM Plex Mono', monospace; flex-shrink: 0;
  transition: background .3s;
}
.nb-asset-name { font-size: 15px; font-weight: 800; letter-spacing: -.01em; }
.nb-asset-pair { font-size: 10px; color: var(--muted); font-family: 'IBM Plex Mono', monospace; }
.nb-price-col { text-align: right; }
.nb-price { font-family: 'IBM Plex Mono', monospace; font-size: 15px; font-weight: 700; color: var(--up); }
.nb-change { font-size: 10px; font-family: 'IBM Plex Mono', monospace; font-weight: 600; color: var(--up); }
.nb-change.neg { color: var(--dn); }

/* Timeframe tabs */
.nb-tf-tabs {
  display: flex; gap: 2px; padding: 7px 12px;
  border-bottom: 1px solid var(--border);
}
.nb-tf {
  padding: 3px 9px; border-radius: 5px; border: none;
  background: transparent; color: var(--muted);
  font-family: 'IBM Plex Mono', monospace; font-size: 10px; font-weight: 600;
  cursor: pointer; transition: all .15s;
}
.nb-tf.active { background: var(--up-bg); color: var(--up); }
.nb-tf:hover:not(.active) { color: var(--text); }

/* Mini chart */
.nb-chart-wrap {
  position: relative; height: 106px;
  background: var(--bg4); overflow: hidden;
}
.nb-chart-wrap canvas { display: block; width: 100%; height: 100%; }
.nb-chart-labels {
  position: absolute; top: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 6px 8px; pointer-events: none;
}
.nb-chart-labels span {
  font-family: 'IBM Plex Mono', monospace; font-size: 9px;
  color: var(--muted); opacity: .6;
}

/* Stats 2x2 */
.nb-stats-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1px; background: var(--border);
}
.nb-stat {
  background: var(--bg3); padding: 9px 14px;
  display: flex; flex-direction: column; gap: 2px;
}
.nb-st-lbl {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: var(--muted);
}
.nb-st-val { font-family: 'IBM Plex Mono', monospace; font-size: 12px; font-weight: 600; color: var(--text); }
.nb-st-val.green { color: var(--up); }
.nb-st-val.red   { color: var(--dn); }

/* Order Book */
.nb-ob-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 16px 9px; border-bottom: 1px solid var(--border);
}
.nb-ob-title { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.nb-ob-prec { display: flex; gap: 3px; }
.nb-prec-btn {
  padding: 2px 7px; border-radius: 4px;
  border: 1px solid var(--border2); background: transparent;
  color: var(--muted); font-size: 9px; font-family: 'IBM Plex Mono', monospace;
  cursor: pointer; transition: all .15s;
}
.nb-prec-btn.active { background: var(--bg5); color: var(--text); }
.nb-ob-cols {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  padding: 5px 14px; border-bottom: 1px solid var(--border);
}
.nb-ob-cols span { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.nb-ob-cols span:nth-child(2) { text-align: center; }
.nb-ob-cols span:nth-child(3) { text-align: right; }

.nb-ob-row {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  padding: 3px 14px; position: relative; cursor: default;
  transition: background .1s;
}
.nb-ob-row:hover { background: rgba(255,255,255,0.03); }
.nb-ob-fill {
  position: absolute; top: 0; bottom: 0; right: 0;
  border-radius: 2px 0 0 2px; pointer-events: none;
}
.nb-ob-asks .nb-ob-fill { background: rgba(217,92,110,0.10); }
.nb-ob-bids .nb-ob-fill { background: rgba(61,186,133,0.10); }
.nb-ob-row span { font-family: 'IBM Plex Mono', monospace; font-size: 11px; position: relative; z-index: 1; }
.nb-ob-asks .nb-ob-price { color: var(--dn); font-weight: 600; }
.nb-ob-bids .nb-ob-price { color: var(--up); font-weight: 600; }
.nb-ob-size  { color: var(--text); text-align: center; }
.nb-ob-total { color: var(--muted); text-align: right; font-size: 10px; }

.nb-ob-spread {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 14px;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  background: var(--bg4);
}
.nb-ob-spread-tag { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.nb-ob-spread-price { font-family: 'IBM Plex Mono', monospace; font-size: 14px; font-weight: 700; color: var(--up); flex: 1; }
.nb-ob-spread-pct { font-family: 'IBM Plex Mono', monospace; font-size: 10px; color: var(--muted); background: var(--bg5); padding: 2px 7px; border-radius: 5px; }

.nb-ob-trades { padding: 8px 14px 12px; border-top: 1px solid var(--border); }
.nb-ob-trades-title { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 7px; }
.nb-trade-row { display: grid; grid-template-columns: 1fr 1fr 1fr; margin-bottom: 3px; }
.nb-trade-row span { font-family: 'IBM Plex Mono', monospace; font-size: 10px; }
.nb-trade-row .nb-t-price { font-weight: 600; }
.nb-trade-row .nb-t-price.buy  { color: var(--up); }
.nb-trade-row .nb-t-price.sell { color: var(--dn); }
.nb-trade-row .nb-t-size  { color: var(--muted); text-align: center; }
.nb-trade-row .nb-t-time  { color: var(--muted); text-align: right; opacity: .6; }

/* ══════════════════════
   COL 2: Form
══════════════════════ */
.nb-form-col { min-width: 0; }

.nb-bot-form {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 20px; overflow: hidden;
  position: relative;
}
.nb-bot-form::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--up), rgba(61,186,133,.08));
  border-radius: 2px 2px 0 0;
}

.nb-form-header {
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
}
.nb-form-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 100px; border: 1px solid;
  margin-bottom: 8px;
}
.nb-badge-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.nb-form-title { font-size: 20px; font-weight: 800; line-height: 1; letter-spacing: -.01em; }
.nb-form-sub   { font-size: 12px; color: var(--muted); margin-top: 5px; font-weight: 400; line-height: 1.4; }
.nb-help-btn {
  flex-shrink: 0;
  background: rgba(255,255,255,0.03); border: 1px solid var(--border2);
  color: var(--muted); font-size: 12px; font-weight: 600;
  padding: 8px 12px; border-radius: 9px;
  cursor: pointer; transition: all .2s; white-space: nowrap;
}
.nb-help-btn:hover { color: var(--up); border-color: var(--up-bd); }

.nb-how-box {
  margin: 0 28px;
  padding: 14px 16px;
  background: rgba(61,186,133,.05); border: 1px solid var(--up-bd); border-radius: 12px;
  font-size: 12px; color: var(--muted); line-height: 1.55;
}
.nb-how-box strong { color: var(--text); }

.nb-form-body { padding: 22px 28px 28px; }

/* Section headers */
.nb-sec-hd {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 12px; margin-top: 2px;
}
.nb-ico {
  width: 20px; height: 20px; border-radius: 5px;
  background: var(--up-bg); border: 1px solid var(--up-bd); color: var(--up);
  font-size: 10px; font-weight: 800; font-family: 'IBM Plex Mono', monospace;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.nb-lbl { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); }
.nb-lbl-note { font-size: 11px; color: var(--muted); opacity: .55; margin-left: auto; font-weight: 400; font-family: 'IBM Plex Mono', monospace; }

.nb-divider { height: 1px; background: var(--border); margin: 18px 0; }

/* Field grids */
.nb-fg2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.nb-fg3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.nb-fg4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 10px; }

.nb-f { display: flex; flex-direction: column; gap: 5px; }
.nb-f > label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: var(--muted);
}
.nb-f input, .nb-f select {
  background: var(--bg4); border: 1.5px solid var(--border2);
  border-radius: 10px; padding: 10px 12px;
  color: var(--text); font-family: 'IBM Plex Mono', monospace; font-size: 13px;
  outline: none; width: 100%; transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
}
.nb-f input:focus, .nb-f select:focus {
  border-color: var(--up-bd);
  box-shadow: 0 0 0 3px rgba(61,186,133,.08);
}
.nb-fnote { font-size: 10px; color: var(--muted); font-family: 'IBM Plex Mono', monospace; opacity: .7; }

/* Direction cards */
.nb-dir-cards {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 8px; margin-bottom: 20px;
}
.nb-dc {
  padding: 13px 10px 12px; border-radius: 11px;
  border: 1.5px solid var(--border2); background: var(--bg4);
  cursor: pointer; transition: all .2s; text-align: center; user-select: none;
}
.nb-dc-icon { font-size: 18px; margin-bottom: 5px; }
.nb-dc-name { font-size: 13px; font-weight: 700; color: var(--muted); line-height: 1; }
.nb-dc-note { font-size: 10px; color: var(--muted); margin-top: 3px; opacity: .65; }
.nb-dc:hover { border-color: rgba(255,255,255,.2); }

.nb-dc-neutral.sel { border-color: rgba(108,141,255,.35); background: rgba(108,141,255,.08); }
.nb-dc-neutral.sel .nb-dc-name { color: var(--accent); }
.nb-dc-long.sel    { border-color: var(--up-bd); background: var(--up-bg); }
.nb-dc-long.sel    .nb-dc-name { color: var(--up); }
.nb-dc-short.sel   { border-color: var(--dn-bd); background: var(--dn-bg); }
.nb-dc-short.sel   .nb-dc-name { color: var(--dn); }

/* Toggle */
.nb-toggle-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; background: var(--bg4);
  border-radius: 11px; border: 1px solid var(--border);
  margin-bottom: 8px; cursor: pointer; transition: border-color .2s;
}
.nb-toggle-item:hover { border-color: var(--border2); }
.nb-ti-name { font-size: 13px; font-weight: 600; }
.nb-ti-desc { font-size: 11px; color: var(--muted); margin-top: 2px; line-height: 1.3; }
.nb-sw {
  width: 38px; height: 21px; border-radius: 11px;
  background: var(--bg5); border: 1px solid var(--border2);
  position: relative; cursor: pointer; flex-shrink: 0;
  transition: background .2s, border-color .2s;
}
.nb-sw.on { background: var(--up); border-color: var(--up); box-shadow: 0 0 8px rgba(61,186,133,.3); }
.nb-sw::after {
  content: ''; position: absolute;
  top: 2px; left: 2px; width: 15px; height: 15px;
  background: rgba(255,255,255,.5); border-radius: 50%; transition: left .2s, background .2s;
}
.nb-sw.on::after { left: 19px; background: #fff; }

/* Capital block */
.nb-capital-block {
  background: var(--bg4); border: 1.5px solid var(--border2);
  border-radius: 13px; padding: 15px 16px;
  transition: border-color .2s;
}
.nb-capital-block:focus-within { border-color: var(--up-bd); box-shadow: 0 0 0 3px rgba(61,186,133,.07); }
.nb-cap-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 9px; }
.nb-cap-lbl { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.nb-cap-bal { font-size: 11px; font-family: 'IBM Plex Mono', monospace; color: var(--up); font-weight: 600; }
.nb-cap-bal span { color: var(--muted); font-weight: 400; }
.nb-cap-amount { display: flex; align-items: center; gap: 8px; margin-bottom: 11px; }
.nb-cap-amount input {
  background: transparent; border: none; color: var(--text);
  font-family: 'IBM Plex Mono', monospace; font-size: 22px; font-weight: 700;
  outline: none; flex: 1; min-width: 0; padding: 0;
}
.nb-cap-amount input::placeholder { color: var(--muted); }
.nb-cap-cur { font-size: 13px; font-weight: 700; color: var(--muted); font-family: 'IBM Plex Mono', monospace; flex-shrink: 0; }

.nb-cap-slider {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 5px; border-radius: 5px;
  background: var(--bg5); outline: none; cursor: pointer;
  border: none; padding: 0; display: block;
}
.nb-cap-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--up); cursor: pointer;
  box-shadow: 0 0 0 3px rgba(61,186,133,.2), 0 2px 6px rgba(0,0,0,.4);
  transition: box-shadow .2s, transform .1s;
}
.nb-cap-slider::-webkit-slider-thumb:hover {
  box-shadow: 0 0 0 5px rgba(61,186,133,.25), 0 2px 6px rgba(0,0,0,.4);
  transform: scale(1.1);
}
.nb-cap-slider::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--up); cursor: pointer; border: none;
  box-shadow: 0 0 0 3px rgba(61,186,133,.2);
}
.nb-slider-labels {
  display: flex; justify-content: space-between; margin-top: 6px;
}
.nb-slider-labels span { font-size: 10px; font-family: 'IBM Plex Mono', monospace; color: var(--muted); }
.nb-slider-pct { color: var(--up) !important; font-weight: 600 !important; }
.nb-pct-badges { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.nb-pct-btn {
  padding: 4px 10px; border-radius: 100px;
  border: 1px solid var(--border2); background: var(--bg5);
  font-size: 11px; font-weight: 700; color: var(--muted);
  font-family: 'IBM Plex Mono', monospace; cursor: pointer; transition: all .15s;
}
.nb-pct-btn:hover, .nb-pct-btn.active-pct { border-color: var(--up-bd); color: var(--up); background: var(--up-bg); }

/* Warning */
.nb-pv-warn {
  margin-top: 10px; min-height: 0;
  font-size: 12px; color: var(--dn);
  font-family: 'IBM Plex Mono', monospace;
  line-height: 1.4;
}

/* Create button */
.nb-create-btn {
  width: 100%; margin-top: 20px;
  padding: 15px; border: none; border-radius: 12px;
  background: linear-gradient(105deg, #3dba85 0%, #2fa874 100%);
  color: #fff; font-size: 15px; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px;
  position: relative; overflow: hidden;
  transition: opacity .2s, transform .1s;
  box-shadow: 0 4px 20px rgba(61,186,133,.22);
  font-family: inherit; letter-spacing: .01em;
}
.nb-create-btn::before {
  content: ''; position: absolute; top: 0; left: -100%; width: 200%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.12), transparent);
  transition: left .55s;
}
.nb-create-btn:hover::before { left: 100%; }
.nb-create-btn:hover { opacity: .88; }
.nb-create-btn:active { transform: scale(.985); }

/* ══════════════════════
   COL 3: Right panel
══════════════════════ */
.nb-right-panel { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 16px; }

.nb-r-card {
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: 16px; padding: 18px; position: relative; overflow: hidden;
}
.nb-r-card::before {
  content: ''; position: absolute;
  left: 0; top: 20%; bottom: 20%; width: 2px;
  background: var(--up); border-radius: 2px; opacity: .25;
}
.nb-r-title {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--muted); margin-bottom: 13px;
}
.nb-stat-list { display: flex; flex-direction: column; gap: 7px; }
.nb-stat-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 11px; background: var(--bg4); border-radius: 8px; border: 1px solid var(--border);
}
.nb-s-lbl { font-size: 11px; color: var(--muted); font-weight: 500; }
.nb-s-val { font-family: 'IBM Plex Mono', monospace; font-size: 13px; font-weight: 600; color: var(--up); }
.nb-s-val.neutral { color: var(--text); }

/* Grid visualizer */
.nb-grid-viz {
  position: relative; height: 178px; background: var(--bg4);
  border-radius: 10px; overflow: hidden; margin-top: 12px; border: 1px solid var(--border);
}
.nb-gz-line { position: absolute; left: 0; right: 0; height: 1px; background: rgba(255,255,255,.05); }
.nb-gz-cur  { background: rgba(61,186,133,.55) !important; height: 1.5px !important; box-shadow: 0 0 6px rgba(61,186,133,.35); }
.nb-gz-lbl  { position: absolute; right: 8px; font-family: 'IBM Plex Mono', monospace; font-size: 9px; font-weight: 600; padding: 2px 6px; border-radius: 4px; transform: translateY(-50%); }
.nb-gz-up   { color: var(--dn); background: var(--dn-bg); }
.nb-gz-mid  { color: var(--up); background: var(--up-bg); }
.nb-gz-dn   { color: var(--up); background: var(--up-bg); opacity: .7; }
.nb-gz-zone { position: absolute; left: 30px; right: 0; display: flex; align-items: center; padding-left: 6px; }
.nb-z-lbl   { font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-family: 'IBM Plex Mono', monospace; }
.nb-gz-sell .nb-z-lbl { color: rgba(217,92,110,.5); }
.nb-gz-buy  .nb-z-lbl { color: rgba(61,186,133,.5); }
.nb-gz-dot  {
  position: absolute; left: 13px; width: 13px; height: 13px;
  border-radius: 50%; background: var(--up);
  box-shadow: 0 0 10px rgba(61,186,133,.7);
  animation: nbPulse 2s ease infinite;
}
@keyframes nbPulse {
  0%,100% { box-shadow: 0 0 8px rgba(61,186,133,.6); }
  50%      { box-shadow: 0 0 18px rgba(61,186,133,.9); }
}

/* Minimum recommended */
.nb-minrec { overflow: hidden; border-radius: 10px; border: 1px solid var(--border2); }
.nb-minrec.st-ok   { border-color: rgba(61,186,133,.28);  background: rgba(61,186,133,.04); }
.nb-minrec.st-warn { border-color: rgba(245,166,35,.35);  background: rgba(245,166,35,.04); }
.nb-minrec.st-err  { border-color: rgba(217,92,110,.35);  background: rgba(217,92,110,.05);
  animation: nbShake .35s ease; }
@keyframes nbShake {
  0%,100% { transform: translateX(0); } 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); }
}
.nb-mr-inner { display: flex; align-items: center; gap: 11px; padding: 12px 14px; }
.nb-mr-icon  { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }
.nb-minrec.st-ok   .nb-mr-icon { background: rgba(61,186,133,.14); }
.nb-minrec.st-warn .nb-mr-icon { background: rgba(245,166,35,.14); }
.nb-minrec.st-err  .nb-mr-icon { background: rgba(217,92,110,.14); }
.nb-mr-body { flex: 1; min-width: 0; }
.nb-mr-row  { display: flex; align-items: baseline; gap: 6px; }
.nb-mr-val  { font-family: 'IBM Plex Mono', monospace; font-size: 17px; font-weight: 700; transition: color .3s; }
.nb-mr-cur  { font-size: 11px; font-weight: 700; color: var(--muted); font-family: 'IBM Plex Mono', monospace; }
.nb-minrec.st-ok   .nb-mr-val { color: var(--up); }
.nb-minrec.st-warn .nb-mr-val { color: #f5a623; }
.nb-minrec.st-err  .nb-mr-val { color: var(--dn); }
.nb-mr-msg  { font-size: 11px; color: var(--muted); margin-top: 3px; line-height: 1.35; transition: color .3s; }
.nb-minrec.st-ok   .nb-mr-msg { color: rgba(61,186,133,.75); }
.nb-minrec.st-warn .nb-mr-msg { color: rgba(245,166,35,.85); }
.nb-minrec.st-err  .nb-mr-msg { color: rgba(217,92,110,.85); }
.nb-mr-breakdown { border-top: 1px solid var(--border); padding: 9px 14px; display: grid; grid-template-columns: repeat(3,1fr); gap: 5px; }
.nb-mrd      { display: flex; flex-direction: column; gap: 2px; text-align: center; }
.nb-mrd-lbl  { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); opacity: .7; }
.nb-mrd-val  { font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 600; color: var(--text); }

/* Tips */
.nb-tips { display: flex; flex-direction: column; gap: 8px; }
.nb-tip  { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: var(--muted); line-height: 1.45; }
.nb-tip span:first-child { font-size: 13px; flex-shrink: 0; margin-top: 1px; }

/* ── Responsive ── */
@media (max-width: 1100px) {
  .nb-split { grid-template-columns: 260px 1fr; }
  .nb-right-panel { display: none; }
  .nb-fg4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nb-split { grid-template-columns: 1fr; }
  .nb-market-panel { display: none; }
  .nb-fg4, .nb-fg3, .nb-fg2 { grid-template-columns: 1fr 1fr; }
}

/* ═══════════════════════════════════════════
   PER-BOT color overrides — Martingala (red) & Gridmart (purple)
   ═══════════════════════════════════════════ */

/* ── Martingala ── */
#martingaleForm .nb-bot-form::before,
#martingaleForm.nb-bot-form::before {
  background: linear-gradient(90deg, var(--dn), rgba(217,92,110,.06));
}
#martingaleForm .nb-ico {
  background: rgba(217,92,110,.1);
  border-color: rgba(217,92,110,.25);
  color: var(--dn);
}
#martingaleForm .nb-how-box {
  background: rgba(217,92,110,.05);
  border-color: rgba(217,92,110,.2);
}
#martingaleForm .nb-capital-block:focus-within {
  border-color: rgba(217,92,110,.35);
  box-shadow: 0 0 0 3px rgba(217,92,110,.06);
}
#martingaleForm .nb-cap-slider::-webkit-slider-thumb {
  background: var(--dn);
  box-shadow: 0 0 0 3px rgba(217,92,110,.2), 0 2px 6px rgba(0,0,0,.4);
}
#martingaleForm .nb-cap-slider::-webkit-slider-thumb:hover {
  box-shadow: 0 0 0 5px rgba(217,92,110,.25), 0 2px 6px rgba(0,0,0,.4);
}
#martingaleForm .nb-cap-slider::-moz-range-thumb { background: var(--dn); }
#martingaleForm .nb-slider-pct { color: var(--dn) !important; }
#martingaleForm .nb-pct-btn:hover,
#martingaleForm .nb-pct-btn.active-pct {
  border-color: rgba(217,92,110,.35);
  color: var(--dn);
  background: rgba(217,92,110,.1);
}
#martingaleForm .nb-r-card::before { background: var(--dn); }

/* ── Gridmart ── */
#gridIncForm .nb-bot-form::before,
#gridIncForm.nb-bot-form::before {
  background: linear-gradient(90deg, var(--purple), rgba(146,120,224,.06));
}
#gridIncForm .nb-ico {
  background: rgba(146,120,224,.1);
  border-color: rgba(146,120,224,.25);
  color: var(--purple);
}
#gridIncForm .nb-how-box {
  background: rgba(146,120,224,.05);
  border-color: rgba(146,120,224,.2);
}
#gridIncForm .nb-capital-block:focus-within {
  border-color: rgba(146,120,224,.35);
  box-shadow: 0 0 0 3px rgba(146,120,224,.06);
}
#gridIncForm .nb-cap-slider::-webkit-slider-thumb {
  background: var(--purple);
  box-shadow: 0 0 0 3px rgba(146,120,224,.2), 0 2px 6px rgba(0,0,0,.4);
}
#gridIncForm .nb-cap-slider::-webkit-slider-thumb:hover {
  box-shadow: 0 0 0 5px rgba(146,120,224,.25), 0 2px 6px rgba(0,0,0,.4);
}
#gridIncForm .nb-cap-slider::-moz-range-thumb { background: var(--purple); }
#gridIncForm .nb-slider-pct { color: var(--purple) !important; }
#gridIncForm .nb-pct-btn:hover,
#gridIncForm .nb-pct-btn.active-pct {
  border-color: rgba(146,120,224,.35);
  color: var(--purple);
  background: rgba(146,120,224,.1);
}

/* ── Direction cards: Long/Short only (no Neutral) for mart & gridmart ── */
#martingaleForm .nb-dir-side-long.sel,
#gridIncForm    .nb-dir-side-long.sel  {
  border-color: var(--up-bd); background: var(--up-bg);
}
#martingaleForm .nb-dir-side-long.sel .nb-dc-name,
#gridIncForm    .nb-dir-side-long.sel .nb-dc-name  { color: var(--up); }
#martingaleForm .nb-dir-side-short.sel,
#gridIncForm    .nb-dir-side-short.sel {
  border-color: var(--dn-bd); background: var(--dn-bg);
}
#martingaleForm .nb-dir-side-short.sel .nb-dc-name,
#gridIncForm    .nb-dir-side-short.sel .nb-dc-name { color: var(--dn); }

/* Shared internal top-left nav buttons — exact same feel as top tabs */
.btn-topnav {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 11px 14px;
  cursor: pointer;
  font-family: var(--ff-body);
  font-weight: 500;
  font-size: 12.5px;
  border-bottom: 2px solid transparent;
  transition: background .15s, color .15s, border-color .15s, opacity .15s;
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-topnav:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  transform: none;
}
.btn-topnav:active {
  transform: none;
}

/* ═══════════════════════════════════════════════════════════════
   LEADERBOARD TAB
   ═══════════════════════════════════════════════════════════════ */
.lb-shell { padding: 14px 14px 24px; max-width: 1400px; margin: 0 auto; }
.lb-header { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:16px; flex-wrap:wrap; }
.lb-header-left { display:flex; flex-direction:column; gap:3px; }
.lb-title { font-family:var(--ff-display); font-size:17px; font-weight:700; letter-spacing:-.01em; display:flex; align-items:center; gap:8px; }
.lb-sub { font-size:10.5px; color:var(--muted); font-family:var(--ff-mono); letter-spacing:.02em; }
.lb-refresh-btn { align-self:flex-start; }
.lb-controls { display:flex; align-items:center; gap:18px; flex-wrap:wrap; margin-bottom:14px; }
.lb-ctrl-group { display:flex; align-items:center; gap:8px; }
.lb-ctrl-label { font-size:10px; font-weight:600; text-transform:uppercase; letter-spacing:.08em; color:var(--dim); font-family:var(--ff-mono); white-space:nowrap; }
.lb-live-badge { display:inline-flex; align-items:center; gap:6px; background:var(--up-bg); border:1px solid var(--up-bd); border-radius:20px; padding:3px 10px 3px 8px; font-family:var(--ff-mono); font-size:10px; color:var(--up); font-weight:600; }
.lb-live-dot { width:6px; height:6px; border-radius:50%; background:var(--up); animation:badge-glow 2.5s ease infinite; flex-shrink:0; }
.lb-kpi-row { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin-bottom:14px; }
@media (max-width:700px){ .lb-kpi-row { grid-template-columns:repeat(2,1fr); } }
.lb-kpi { background:var(--bg3); border:1px solid var(--border); border-radius:var(--r); padding:10px 12px; }
.lb-kpi-lbl { font-family:var(--ff-ibm,'IBM Plex Mono',monospace); font-size:9px; font-weight:500; text-transform:uppercase; letter-spacing:.1em; color:var(--dim); margin-bottom:4px; }
.lb-kpi-val { font-family:var(--ff-ibm,'IBM Plex Mono',monospace); font-size:18px; font-weight:600; letter-spacing:-.02em; color:var(--text); font-variant-numeric:tabular-nums; }
.lb-kpi-val.good { color:var(--up); } .lb-kpi-val.bad { color:var(--dn); }
.lb-table-wrap { background:var(--bg2); border:1px solid var(--border); border-radius:var(--r2); overflow:hidden; }
.lb-thead, .lb-row { display:grid; grid-template-columns:46px 1.15fr 1fr 96px 112px 112px 104px 102px 92px 94px; padding:0 12px; }
.lb-thead { background:var(--bg4); border-bottom:1px solid var(--border2); }
.lb-th { font-family:var(--ff-ibm,'IBM Plex Mono',monospace); font-size:8.5px; font-weight:600; text-transform:uppercase; letter-spacing:.1em; color:var(--dim); padding:8px 8px; display:flex; align-items:center; }
.lb-row { border-bottom:1px solid var(--border); align-items:center; transition:background .14s; min-height:52px; }
.lb-row:last-child { border-bottom:none; } .lb-row:hover { background:var(--bg4); }
.lb-cell-rank { font-family:var(--ff-ibm,'IBM Plex Mono',monospace); font-size:11px; font-weight:700; color:var(--dim); padding:6px; }
.lb-cell-rank.top3 { color:var(--warn); } .lb-cell-rank.top1 { color:#f5c842; }
.lb-cell-bot { padding:6px; display:flex; flex-direction:column; gap:4px; }
.lb-bot-top { display:flex; align-items:center; gap:6px; }
.lb-asset { font-family:var(--ff-ibm,'IBM Plex Mono',monospace); font-size:13px; font-weight:700; letter-spacing:-.01em; color:var(--text); }
.lb-bot-type { font-family:var(--ff-ibm,'IBM Plex Mono',monospace); font-size:8.5px; font-weight:500; text-transform:uppercase; letter-spacing:.08em; color:var(--muted); margin-top:1px; }
.lb-dir { font-family:var(--ff-ibm,'IBM Plex Mono',monospace); font-size:8px; font-weight:600; letter-spacing:.1em; text-transform:uppercase; padding:2px 6px; border-radius:4px; flex-shrink:0; }
.lb-dir.long { background:var(--up-bg); color:var(--up); border:1px solid var(--up-bd); }
.lb-dir.short { background:var(--dn-bg); color:var(--dn); border:1px solid var(--dn-bd); }
.lb-dir.neutral { background:var(--acc-bg); color:var(--accent); border:1px solid var(--acc-bd); }
.lb-cell-cfg { padding:6px; display:flex; flex-wrap:wrap; gap:3px; }
.lb-cfg-chip { font-family:var(--ff-ibm,'IBM Plex Mono',monospace); font-size:8px; color:var(--muted); background:var(--bg5); border:1px solid var(--border); border-radius:4px; padding:2px 6px; white-space:nowrap; }
.lb-cfg-chip span { color:var(--text); }
.lb-cell-num { font-family:var(--ff-ibm,'IBM Plex Mono',monospace); font-size:12px; font-weight:600; font-variant-numeric:tabular-nums; padding:6px 8px; color:var(--text); white-space:nowrap; }
.lb-cell-num.good { color:var(--up); } .lb-cell-num.bad { color:var(--dn); } .lb-cell-num.muted { color:var(--muted); font-weight:400; }
.lb-substat { font-size:10px; line-height:1.2; opacity:.9; margin-top:2px; font-weight:500; }
.lb-roi-wrap { display:flex; flex-direction:column; gap:3px; padding:6px 8px; min-width:0; }
.lb-roi-val { font-family:var(--ff-ibm,'IBM Plex Mono',monospace); font-size:12px; font-weight:600; font-variant-numeric:tabular-nums; }
.lb-roi-val.good { color:var(--up); } .lb-roi-val.bad { color:var(--dn); }
.lb-roi-bar-track { height:3px; background:var(--bg5); border-radius:2px; overflow:hidden; width:100%; }
.lb-roi-bar-fill { height:100%; border-radius:2px; transition:width .6s cubic-bezier(.4,0,.2,1); }
.lb-roi-bar-fill.good { background:linear-gradient(90deg,var(--up), rgba(61,186,133,.3)); }
.lb-roi-bar-fill.bad { background:linear-gradient(90deg,var(--dn), rgba(217,92,110,.3)); }
.lb-cell-uptime { font-family:var(--ff-ibm,'IBM Plex Mono',monospace); font-size:10px; color:var(--muted); padding:6px 18px 6px 18px; white-space:nowrap; text-align:left; }
.lb-empty { display:flex; flex-direction:column; align-items:center; gap:10px; padding:48px 24px; color:var(--dim); font-size:12px; font-family:var(--ff-mono); }
.lb-loading { padding:12px 10px; display:flex; flex-direction:column; gap:6px; }
.lb-skel-row { height:50px; border-radius:6px; background:linear-gradient(90deg,var(--bg3) 25%,var(--bg4) 50%,var(--bg3) 75%); background-size:400px 100%; animation:shimmer 1.4s infinite; }
.lb-th-copy { width:94px; } .lb-cell-copy { padding:5px; display:flex; align-items:center; }
.lb-copy-btn { display:inline-flex; align-items:center; gap:5px; font-family:var(--ff-ibm); font-size:9px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; padding:5px 10px; border-radius:6px; cursor:pointer; border:1px solid var(--acc-bd); background:var(--acc-bg); color:var(--accent); transition:all .16s; white-space:nowrap; }
.lb-copy-btn:hover { background:rgba(108,141,255,.18); border-color:rgba(108,141,255,.4); box-shadow:0 0 12px rgba(108,141,255,.12); transform:translateY(-1px); }
.lb-copy-btn:active { transform:scale(.95); }
@media (max-width:900px){ .lb-thead, .lb-row { grid-template-columns:38px 1.15fr 98px 98px 98px 92px 100px 92px; } .lb-th-cfg,.lb-cell-cfg,.lb-th-aum,.lb-cell-aum,.lb-th-uptime,.lb-cell-uptime { display:none; } }
@media (max-width:600px){ .lb-thead, .lb-row { grid-template-columns:32px 1fr 82px 82px 76px 88px; } .lb-th-cfg,.lb-cell-cfg,.lb-th-aum,.lb-cell-aum,.lb-th-pnl,.lb-cell-ppnl,.lb-th-apr,.lb-cell-apr,.lb-th-uptime,.lb-cell-uptime { display:none; } }
.modal-overlay { position:fixed; inset:0; z-index:400; background:rgba(0,0,0,.72); backdrop-filter:blur(6px); display:flex; align-items:center; justify-content:center; opacity:0; pointer-events:none; transition:opacity .2s; padding:16px; overflow-y:auto; -webkit-overflow-scrolling:touch; }
.modal-overlay.open { opacity:1; pointer-events:all; }
.modal-box { background:var(--bg3); border:1px solid var(--acc-bd); border-radius:var(--r2); padding:24px 22px 20px; width:min(390px,94vw); max-height:calc(100vh - 40px); max-height:calc(100dvh - 40px); overflow:auto; -webkit-overflow-scrolling:touch; box-shadow:0 20px 60px rgba(0,0,0,.7),0 0 0 1px rgba(108,141,255,.06); transform:translateY(12px) scale(.97); transition:transform .22s cubic-bezier(.34,1.56,.64,1); }
.modal-overlay.open .modal-box { transform:translateY(0) scale(1); }
.modal-icon { width:38px; height:38px; border-radius:10px; background:var(--acc-bg); border:1px solid var(--acc-bd); display:flex; align-items:center; justify-content:center; margin-bottom:12px; }
.modal-title { font-family:var(--ff-display); font-size:15px; font-weight:700; margin-bottom:5px; }
.modal-sub { font-size:11px; color:var(--muted); margin-bottom:16px; line-height:1.55; }
.modal-params { background:var(--bg4); border:1px solid var(--border); border-radius:var(--r); padding:11px 13px; margin-bottom:14px; display:flex; flex-direction:column; gap:7px; }
.modal-param-row { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.modal-param-key { font-family:var(--ff-ibm); font-size:9.5px; text-transform:uppercase; letter-spacing:.08em; color:var(--dim); }
.modal-param-val { font-family:var(--ff-ibm); font-size:11px; font-weight:600; color:var(--text); }
.modal-param-val.good { color:var(--up); } .modal-param-val.bad { color:var(--dn); } .modal-param-val.acc { color:var(--accent); }
.modal-note { display:flex; gap:8px; align-items:flex-start; background:var(--warn-bg); border:1px solid var(--warn-bd); border-radius:var(--r); padding:9px 11px; margin-bottom:16px; font-size:10.5px; color:rgba(255,255,255,.65); line-height:1.5; }
.modal-actions { display:flex; gap:8px; }
.btn-modal-go { flex:1; border:none; cursor:pointer; background:linear-gradient(105deg,#5a7bef,var(--accent)); color:#fff; font-family:var(--ff-ibm); font-size:11px; font-weight:600; letter-spacing:.04em; padding:9px 16px; border-radius:var(--r); display:flex; align-items:center; justify-content:center; gap:6px; transition:opacity .15s,transform .15s; }
.btn-modal-go:hover { opacity:.88; transform:translateY(-1px); } .btn-modal-go:active { transform:scale(.97); }
.btn-modal-cancel { border:1px solid var(--border2); background:var(--bg5); color:var(--muted); font-family:var(--ff-ibm); font-size:11px; padding:9px 16px; border-radius:var(--r); cursor:pointer; transition:all .15s; }
.btn-modal-cancel:hover { color:var(--text); border-color:rgba(255,255,255,.2); }
@media (max-width:560px){
  .modal-overlay { align-items:flex-start; padding:12px 10px max(12px, env(safe-area-inset-bottom, 0px)); }
  .modal-box { width:100%; max-height:calc(100vh - 24px); max-height:calc(100dvh - 24px); padding:18px 14px 14px; }
  .modal-actions { flex-direction:column-reverse; }
  .btn-modal-go, .btn-modal-cancel { width:100%; justify-content:center; }
}



/* ════════════════════════════════════════════════════════
   TOPBAR + BOTTOM NAV — Unified nav styles (nav-component.js)
   Single source of truth — DO NOT duplicate in page <style> blocks
   ════════════════════════════════════════════════════════ */

/* ── Topbar ── */
.topbar {
  height: 50px;
  background: rgba(7,7,11,0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 200;
}

/* ── Logo ── */
.tb-logo {
  flex-shrink: 0;
  padding: 0 18px;
  border-right: 1px solid var(--border);
  height: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--ff-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .01em;
  text-decoration: none;
  color: var(--text);
}
.tb-logo-mark {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--bg4);
  border: 1px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

/* ── Nav items ── */
.tb-nav {
  display: flex;
  align-items: center;
  gap: 1px;
  padding: 0 10px;
  flex: 1;
  overflow: hidden;
}
.tb-nav-item {
  padding: 6px 13px;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, opacity .15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  font-family: var(--ff-body);
}
.tb-nav-item:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.tb-nav-item.active { color: var(--text); background: var(--bg4); }
.tb-nav-item svg { opacity: .5; flex-shrink: 0; }
.tb-nav-item.active svg { opacity: .85; }

/* ── Right side ── */
.tb-right {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  margin-left: auto;
  flex-shrink: 0;
}

/* ── Buttons ── */
.tb-btn {
  padding: 5px 13px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border2);
  background: var(--bg3);
  color: var(--text);
  cursor: pointer;
  font-family: var(--ff-body);
  transition: background .15s, color .15s, border-color .15s, opacity .15s;
  white-space: nowrap;
}
.tb-btn:hover { background: var(--bg4); }
.tb-btn.active { background: var(--bg5); }
.tb-btn-login {
  padding: 5px 13px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--up-bd);
  background: var(--up-bg);
  color: var(--up);
  cursor: pointer;
  font-family: var(--ff-body);
  transition: background .15s, color .15s, border-color .15s, opacity .15s;
  white-space: nowrap;
}
.tb-btn-login:hover { background: rgba(61,186,133,0.16); }

/* ── Lang toggle ── */
.tb-lang {
  display: flex;
  gap: 0;
  border: 1px solid var(--border2);
  border-radius: 10px;
  overflow: hidden;
}
.tb-lang .tb-btn {
  border: none;
  border-radius: 0;
  padding: 4px 10px;
  font-size: 11.5px;
}

/* ── Wallet tag ── */
.wallet-tag {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px 4px 10px;
  font-family: var(--ff-mono);
  font-size: 11.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 7px;
}
.w-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--up);
  box-shadow: 0 0 6px var(--up);
}

/* ── Bottom nav (mobile) ── */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(60px + env(safe-area-inset-bottom, 0px));
  background: rgba(7,7,11,0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  z-index: 1000;
  padding-bottom: max(6px, env(safe-area-inset-bottom, 0px));
}
.bn-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 2px 4px;
  cursor: pointer;
  color: var(--muted);
  transition: color .15s;
  border: none;
  background: transparent;
  font-family: var(--ff-body);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}
.bn-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--up);
  border-radius: 0 0 3px 3px;
  transition: width .2s ease;
}
.bn-item.active::after { width: 28px; }
.bn-item:hover { color: var(--text); }
.bn-item.active { color: var(--up); }
.bn-icon { width: 20px; height: 20px; opacity: .55; transition: opacity .15s; }
.bn-item.active .bn-icon { opacity: 1; }
.bn-label { font-size: 9px; font-weight: 500; letter-spacing: .01em; }

/* ── Responsive ── */
@media (max-width: 920px) {
  .topbar { padding: 0 12px; }
  .topbar .tb-nav { display: none !important; }
  .tb-logo { border-right: 1px solid var(--border); padding: 0 14px 0 0; }
  .bottom-nav { display: flex; justify-content: space-around; align-items: center; }
  /* Ensure page content doesn't hide behind bottom nav */
  body { padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px)); }
}

@media (max-width: 560px) {
  .wallet-tag { max-width: 38vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tb-btn { padding: 5px 9px; font-size: 11px; }
}

/* ── Topbar button variants ── */
.tb-btn-danger { color: var(--dn) !important; border-color: var(--dn-bd) !important; }
.tb-btn-danger:hover { background: var(--dn-bg) !important; }
.tb-btn-icon { min-width: 32px; padding: 5px 8px; font-size: 14px; }

/* ── Login button in app topbar (primary CTA, consistent en todas las páginas) ── */
.tb-btn-login-nav {
  background: var(--up-bg);
  border-color: var(--up-bd);
  color: var(--up);
  font-weight: 600;
}
.tb-btn-login-nav:hover {
  background: rgba(61, 186, 133, 0.16);
  border-color: var(--up);
}

.lb-th-rpnl, .lb-cell-rpnl { display:none !important; }

.lb-th-uptime { justify-content:flex-start; padding-left:18px !important; }


@media (max-width: 920px) {
  .topbar {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
}

@media (hover: none) {
  .tb-nav-item:hover,
  .tab:hover,
  .bn-item:hover,
  .btn-topnav:hover {
    background: transparent;
  }
}
