:root {
  --bg: #e8ece6;
  --panel: #f7f8f5;
  --panel-2: #eef2eb;
  --line: #d5ddd4;
  --text: #14201a;
  --muted: #6a746c;
  --long: #1a8f5c;
  --short: #d64545;
  --accent: #1a6b4a;
  --warn: #c45c26;
  --font: "Manrope", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(900px 420px at 12% -10%, rgba(200, 245, 66, 0.18), transparent 55%),
    radial-gradient(700px 360px at 100% 0%, rgba(26, 107, 74, 0.1), transparent 50%),
    linear-gradient(180deg, #f4f6f1 0%, var(--bg) 42%);
}

.portal {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
}

.portal[hidden] { display: none !important; }

.portal-card {
  width: 100%;
  max-width: 420px;
  background: rgba(18, 24, 31, 0.96);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 18px 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.portal-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.portal-brand h1 {
  margin: 0;
  font-size: 1.25rem;
}

.portal-brand p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.portal-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 14px;
  background: #0c1218;
  border-radius: 12px;
  padding: 4px;
}

.portal-tabs button {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 10px;
  border-radius: 10px;
  font-weight: 600;
  font: inherit;
}

.portal-tabs button.active {
  background: rgba(45, 212, 191, 0.16);
  color: var(--accent);
}

.portal-form label {
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.86rem;
}

.portal-form input {
  width: 100%;
  margin-top: 6px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0c1218;
  color: var(--text);
  font: inherit;
}

/* 登录/注册：白底输入框，避免 portal-form 黑底覆盖 */
.portal-form.nex-auth-form .nex-login-input input,
.nex-auth-form .nex-login-input input {
  margin-top: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--nex-text, #1a1f24);
  font-size: 15px;
}

.portal-form.nex-auth-form > label > input,
.nex-auth-form input.readonly {
  background: #f4f6f8;
  color: #5c6670;
  border: 1px solid #e2e8ee;
}

.portal-err {
  color: var(--short);
  font-size: 0.86rem;
  margin: 0 0 10px;
}

.portal-form .cta {
  width: 100%;
  margin-top: 4px;
}

.app[hidden] { display: none !important; }

.app {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 20px 36px;
}

.top {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

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

.logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.15rem;
  background: linear-gradient(145deg, #16c784 0%, #0f766e 48%, #ea3943 100%);
  color: #061016;
  letter-spacing: 0.04em;
}

h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.sub {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.top-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.badge {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
}

.badge.ok {
  color: var(--long);
  border-color: rgba(22, 199, 132, 0.35);
}

.badge.err {
  color: var(--short);
  border-color: rgba(234, 57, 67, 0.35);
}

.sym-pick {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  position: relative;
}

.sym-box {
  position: relative;
  min-width: 200px;
}

.sym-box input {
  width: 220px;
  background: #0c1218;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  font: inherit;
}

.sym-drop {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 320px;
  overflow: auto;
  background: #f7f8f5;
  border: 1px solid #d5ddd4;
  border-radius: 12px;
  z-index: 30;
  box-shadow: 0 8px 24px rgba(20, 32, 26, 0.12);
}

.sym-drop button {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #14201a;
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid #e8ede6;
}

.sym-drop button:hover {
  background: rgba(26, 107, 74, 0.08);
}

.sym-drop .muted {
  color: #6a746c;
  font-family: var(--mono);
  font-size: 0.78rem;
}

.sym-drop .muted.up {
  color: #1a8f5c;
}

.sym-drop .muted.down {
  color: #d64545;
}

.sym-drop .tag {
  color: #1a6b4a;
  font-size: 0.72rem;
}

.sym-drop .sym-sec {
  padding: 8px 12px 4px;
  color: #6a746c;
  font-size: 0.72rem;
}

select,
input[type="number"],
input[type="range"] {
  font: inherit;
}

select,
input[type="number"] {
  background: #0c1218;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
}

select { min-width: 0; width: 100%; }

button {
  font: inherit;
  cursor: pointer;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  padding: 9px 14px;
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

button.ghost {
  background: transparent;
}

button.ghost.danger {
  color: var(--short);
  border-color: rgba(234, 57, 67, 0.35);
}

.ticker {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 16px;
}

.price-block .sym {
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 2px;
}

.mark {
  font-family: var(--mono);
  font-size: 1.85rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.chg {
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 0.9rem;
}

.chg.up, .up { color: var(--long); }
.chg.down, .down { color: var(--short); }

#spark {
  width: 100%;
  max-width: 360px;
  height: 56px;
  justify-self: center;
}

.equity-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(88px, 1fr));
  gap: 12px 18px;
}

.equity-grid .k {
  color: var(--muted);
  font-size: 0.75rem;
  margin-bottom: 4px;
}

.equity-grid .v {
  font-size: 0.98rem;
  font-weight: 600;
}

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.layout {
  display: none;
}

.shell {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 12px 12px calc(88px + env(safe-area-inset-bottom));
  padding-left: max(12px, env(safe-area-inset-left));
  padding-right: max(12px, env(safe-area-inset-right));
}

.top.compact {
  margin-bottom: 12px;
}

.top.compact h1 {
  font-size: 1.15rem;
}

.page {
  display: none;
  animation: fadeIn 0.22s ease;
}

.page.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.home-ticker {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.home-eq {
  grid-template-columns: repeat(2, 1fr);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 12px;
}

.panel.soft {
  margin-bottom: 12px;
}

.sym-pick.block {
  width: 100%;
  margin-bottom: 12px;
}

.sym-box.grow {
  min-width: 0;
  width: 100%;
}

.sym-box.grow input {
  width: 100%;
}

.home-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.home-actions .cta {
  width: 100%;
}

button.full {
  width: 100%;
  margin-top: 10px;
}

.tabbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(720px, 100%);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  background: rgba(10, 14, 18, 0.92);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(10px);
  z-index: 40;
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.72rem;
  padding: 6px 4px;
}

.tab-item span {
  font-size: 1.05rem;
  line-height: 1;
}

.tab-item.active {
  color: var(--accent);
}

.page .panel {
  margin-bottom: 12px;
}

.page .foot {
  margin: 8px 0 20px;
}

@media (max-width: 1200px) {
  .layout { display: none; }
}

@media (max-width: 980px) {
  .ticker, .home-ticker {
    grid-template-columns: 1fr;
  }
  #spark { max-width: none; }
  .equity-grid, .home-eq {
    grid-template-columns: repeat(2, 1fr);
  }
}

.strat-form select {
  width: 100%;
  margin-top: 6px;
  background: #0c1218;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
}

.check-row {
  display: flex !important;
  align-items: center;
  gap: 8px;
  color: var(--text) !important;
  margin: 4px 0 12px !important;
}

.check-row input {
  width: auto !important;
  margin: 0 !important;
}

.strat-preview { margin-top: 12px; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
}

.panel h2 {
  margin: 0 0 10px;
  font-size: 1.02rem;
  font-weight: 600;
}

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

.head-row h2 { margin: 0; }

.hint {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.55;
}

.hint.tiny {
  margin-top: -6px;
  margin-bottom: 12px;
  font-size: 0.78rem;
}

.tp-mode-static {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  padding: 10px 12px;
  background: #0c1218;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.tp-mode-static .tp-mode-label {
  color: var(--muted);
  font-size: 0.84rem;
}

.tp-mode-static .tp-mode-value {
  color: var(--accent);
  font-size: 0.92rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.stat {
  background: #0c1218;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
}

.stat .k {
  color: var(--muted);
  font-size: 0.75rem;
  margin-bottom: 4px;
}

.stat .v {
  font-size: 1rem;
  font-weight: 600;
}

.stats-sub {
  margin: 0 0 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
}

.day-bars {
  display: grid;
  gap: 8px;
}

.day-row {
  display: grid;
  grid-template-columns: 72px 1fr 72px;
  gap: 8px;
  align-items: center;
  font-size: 0.8rem;
}

.day-row .bar-track {
  height: 8px;
  background: #0c1218;
  border-radius: 999px;
  overflow: hidden;
}

.day-row .bar {
  height: 100%;
  border-radius: 999px;
  min-width: 0;
}

.day-row .bar.up { background: var(--long); }
.day-row .bar.down { background: var(--short); }
.day-row .d { color: var(--muted); }
.day-row .n { text-align: right; font-family: var(--mono); }

.form label {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 12px;
}

.form label input {
  width: 100%;
  margin-top: 6px;
}

.lev-row {
  display: grid;
  grid-template-columns: 1fr 72px auto;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
}

.lev-row input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.unit { color: var(--muted); }

.mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 12px;
}

.tab {
  background: #0c1218;
  padding: 8px;
  font-size: 0.86rem;
}

.tab.active {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  color: var(--accent);
}

.hidden { display: none !important; }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

label.long input { border-color: rgba(22, 199, 132, 0.35); }
label.short input { border-color: rgba(234, 57, 67, 0.35); }

.quick {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}

.quick button {
  padding: 7px 4px;
  font-size: 0.8rem;
  background: #0c1218;
}

.preview {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  background: #0c1218;
  border: 1px solid var(--line);
  margin-bottom: 14px;
}

.preview > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.86rem;
}

.preview span { color: var(--muted); }

.preview b.accent { color: var(--accent); font-weight: 600; }

.cta.dual {
  width: 100%;
  padding: 12px;
  border: none;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #061016;
  background: linear-gradient(90deg, #16c784 0%, #0f766e 45%, #b91c1c 55%, #ea3943 100%);
}

.side-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.side-btns .cta.dual {
  margin-top: 0;
}

.side-btns .cta.ghost.danger,
button.cta.ghost.danger {
  background: linear-gradient(90deg, #7f1d1d, #b91c1c);
  color: #fff;
  border: none;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.side-btns .cta.ghost.danger:disabled,
button.cta.ghost.danger:disabled {
  opacity: 0.4;
}

.long-only {
  background: rgba(22, 199, 132, 0.14);
  border-color: rgba(22, 199, 132, 0.4);
  color: var(--long);
  font-weight: 600;
}

.short-only {
  background: rgba(234, 57, 67, 0.12);
  border-color: rgba(234, 57, 67, 0.4);
  color: var(--short);
  font-weight: 600;
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

.add-plan-wrap {
  max-height: 420px;
  overflow: auto;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  -webkit-overflow-scrolling: touch;
}

.add-plan-wrap thead th {
  position: sticky;
  top: 0;
  background: var(--panel, #12161c);
  z-index: 1;
}

.add-plan-wrap input[type="number"] {
  width: 56px;
  padding: 4px 6px;
  text-align: right;
  font-family: var(--mono);
  font-size: 0.82rem;
}

.add-plan-wrap .unit-inline {
  margin-left: 4px;
  color: var(--muted);
  font-size: 0.75rem;
}

.add-plan-wrap td.num {
  white-space: nowrap;
}

.add-plan-actions {
  margin: 6px 0;
}

.add-plan-actions #btnToggleAddPlan .chev {
  display: inline-block;
  margin-left: 4px;
  transition: transform 0.18s ease;
  font-size: 0.85em;
}

.add-plan-actions #btnToggleAddPlan[aria-expanded="true"] .chev {
  transform: rotate(180deg);
}

.add-plan-panel.collapsed {
  display: none;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

th, td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.78rem;
}

td.num, th.num { text-align: right; font-family: var(--mono); }

.dir {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.dir::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.dir.long { color: var(--long); }
.dir.long::before { background: var(--long); }
.dir.short { color: var(--short); }
.dir.short::before { background: var(--short); }

.empty-row td {
  text-align: center;
  color: var(--muted);
  padding: 28px 8px;
}

.mini {
  padding: 5px 10px;
  font-size: 0.78rem;
}

.foot {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(72px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: #1a2530;
  border: 1px solid var(--line);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  z-index: 50;
  font-size: 0.9rem;
  max-width: calc(100vw - 24px);
}

@media (max-width: 720px) {
  .app.shell {
    max-width: 100%;
    padding-top: 10px;
  }

  .top.compact {
    gap: 8px;
  }

  .top.compact h1 {
    font-size: 1.05rem;
  }

  .logo {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }

  .badge {
    font-size: 0.72rem;
    padding: 4px 8px;
  }

  .panel {
    padding: 12px;
    border-radius: 14px;
  }

  .split {
    grid-template-columns: 1fr;
  }

  select,
  input[type="number"],
  input[type="text"] {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .strat-form select {
    min-width: 0;
  }

  .lev-row {
    flex-wrap: wrap;
  }

  .tabbar {
    width: 100%;
    left: 0;
    transform: none;
  }

  .tab-item {
    font-size: 0.68rem;
    padding: 4px 2px;
  }

  table {
    font-size: 0.78rem;
  }

  th, td {
    padding: 8px 6px;
  }
}

.pos-group.long-group {
  border-color: rgba(22, 199, 132, 0.35);
}

.pos-group.long-group h2 {
  color: var(--long);
}

.pos-group.short-group {
  border-color: rgba(234, 57, 67, 0.35);
}

.pos-group.short-group h2 {
  color: var(--short);
}

.head-row .pos-meta {
  font-size: 0.82rem;
  margin-left: auto;
  margin-right: 10px;
}

.sym-chip {
  font-weight: 600;
}

/* ========== 策略页（墨色酸橙，数据逻辑不变） ========== */
body:has(.shell.nex-pos-mode) {
  background: #eef1ec;
}

.shell.nex-pos-mode {
  max-width: 430px;
  width: 100%;
  background: transparent;
  padding: 0 0 calc(var(--nex-tab-h, 56px) + env(safe-area-inset-bottom));
}

.shell.nex-pos-mode .top.compact {
  display: none;
}

.page.nex-pos {
  --nex-text: #14201a;
  --nex-muted: #6a746c;
  --nex-line: #d5ddd4;
  --nex-blue: #1a6b4a;
  --nex-orange: #c45c26;
  --nex-red: #d64545;
  --nex-green: #1a8f5c;
  font-family: var(--nex-font, "Manrope", "PingFang SC", "Microsoft YaHei", sans-serif);
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0 14px calc(72px + env(safe-area-inset-bottom));
  min-height: calc(100dvh - var(--nex-tab-h, 56px) - env(safe-area-inset-top, 0px) - 68px);
  background:
    linear-gradient(180deg, #14201a 0%, #1a6b4a 88px, #c5d9c8 145px, #eef1ec 210px, #eef1ec 100%);
}

.page.nex-pos.active {
  display: flex;
  flex-direction: column;
}

.nex-header {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 0 12px;
}

.nex-header:has(.nex-back:not([hidden])) .nex-header-main {
  flex: 1;
  min-width: 0;
}

.nex-header-main {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  width: 100%;
}

/* 策略主 Tab 不显示返回箭头；子页用 .nex-navbar .back */
.nex-pos .nex-back,
.nex-back[hidden] {
  display: none !important;
}

.nex-back {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: #fff;
  padding: 0;
  display: grid;
  place-items: center;
}

.nex-back svg {
  width: 22px;
  height: 22px;
}

.nex-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0 14px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.nex-search-ico {
  width: 16px;
  height: 16px;
  color: #c5ccd3;
  flex-shrink: 0;
}

.nex-search input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--nex-text);
  font: inherit;
  font-size: 14px;
  outline: none;
  min-width: 0;
}

.nex-search input::placeholder {
  color: #c5ccd3;
}

.nex-exchange-wrap {
  position: relative;
  flex-shrink: 0;
}

.nex-exchange {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 10px 0 8px;
  border: none;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 18px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  color: #333;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.nex-plat-ico {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  flex-shrink: 0;
}

.nex-plat-ico.plat-gate {
  background: #2354e6;
}

.trade-plat-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #f7f8f5 0%, #e8f0e6 100%);
  border: 1px solid var(--nex-line, #d5ddd4);
  border-radius: 12px;
}

.trade-plat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.trade-plat-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.trade-plat-meta b {
  font-size: 14px;
  color: #1e293b;
}

.trade-plat-switch {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.trade-plat-opt {
  min-width: 44px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #475569;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.trade-plat-opt.active {
  border-color: var(--nex-primary, #1a6b4a);
  background: var(--nex-primary, #1a6b4a);
  color: #fff;
}

.trade-plat-limits {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 12px;
  padding: 8px 12px;
  font-size: 12px;
  color: #64748b;
  background: #f8fafc;
  border-radius: 8px;
}

.trade-plat-limits b {
  color: #0f172a;
}

.nex-plat-ico.plat-oe {
  background: #1a1a1a;
}

.nex-plat-ico.plat-bn {
  background: #f0b90b;
  color: #1a1a1a;
}

.nex-exchange.open .nex-exchange-arr {
  transform: rotate(180deg);
}

.nex-exchange-arr {
  width: 14px;
  height: 14px;
  color: #b0b8c0;
  transition: transform 0.2s ease;
}

.nex-exchange-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 108px;
  padding: 6px 0;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  z-index: 120;
}

.nex-exchange-menu[hidden] {
  display: none !important;
}

.nex-exchange-opt {
  display: block;
  width: 100%;
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: #333;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.nex-exchange-opt:hover,
.nex-exchange-opt.active {
  background: #eef5ec;
  color: var(--nex-primary, #1a6b4a);
}

.nex-summary-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 10px;
  padding: 12px 4px 10px;
  background: var(--nex-card, #f7f8f5);
  border: 1px solid var(--nex-line, #d5ddd4);
  border-radius: 12px;
  box-shadow: none;
}

.nex-summary-card.has-oe {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.nex-summary-card .nex-sum-item {
  text-align: center;
  position: relative;
  min-width: 0;
  padding: 0 2px;
}

.nex-summary-card .nex-sum-item[hidden] {
  display: none !important;
}

.nex-summary-card .nex-sum-item:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 18%;
  height: 64%;
  width: 1px;
  background: var(--nex-line, #d5ddd4);
}

.nex-summary-card .nex-sum-item b {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--nex-text, #14201a);
  line-height: 1.2;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nex-summary-card.has-oe .nex-sum-item b {
  font-size: 14px;
}

.nex-summary-card .nex-sum-item span {
  color: var(--nex-muted, #6a746c);
  font-size: 11px;
}

.nex-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 0 10px;
  padding: 4px;
  background: #e3e8e1;
  border-radius: 12px;
}

.nex-tabs button {
  flex: 1;
  border: none;
  background: transparent;
  color: #566057;
  height: 36px;
  padding: 0 6px;
  border-radius: 9px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.nex-tabs button.active {
  background: #14201a;
  color: #c8f542;
  font-weight: 700;
  box-shadow: none;
}

.nex-leg-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0 0 12px;
}

.nex-leg-panel[hidden],
.nex-hist-panel[hidden] {
  display: none !important;
}

.nex-leg-list {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0;
  min-height: 180px;
  background: var(--nex-card, #f7f8f5);
  border: 1px solid var(--nex-line, #d5ddd4);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: none;
}

.nex-leg-card {
  padding: 8px 12px 8px;
  background: var(--nex-card, #f7f8f5);
}

.nex-leg-card + .nex-leg-card {
  border-top: 1px solid var(--nex-line, #d5ddd4);
}

.nex-leg-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.nex-leg-time {
  color: #9aa49c;
  font-size: 10px;
}

.nex-leg-status {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 8px;
  font-weight: 500;
  line-height: 1.35;
}

.nex-leg-status.run {
  background: rgba(200, 245, 66, 0.28);
  color: #3d5a12;
}

.nex-leg-status.pause {
  background: #eef2eb;
  color: var(--nex-muted, #6a746c);
}

.nex-leg-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 6px;
}

.nex-leg-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.nex-leg-pair {
  font-size: 14px;
  font-weight: 700;
  color: #111;
  margin-right: 2px;
}

.nex-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  flex-shrink: 0;
}

.nex-tag.cycle {
  min-width: 22px;
  height: 22px;
  padding: 0 4px;
  border-radius: 50%;
  color: #14201a;
  background: #c8f542;
  font-size: 9px;
}

.nex-tag.lev {
  color: #fff;
  background: linear-gradient(180deg, #1a8f5c 0%, #1a6b4a 100%);
  border-radius: 3px;
  padding: 2px 5px;
  font-size: 10px;
}

.nex-tag.side {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  color: #fff;
  font-size: 11px;
}

.nex-tag.side.short {
  background: #d64545;
}

.nex-tag.side.long {
  background: #1a8f5c;
}

.nex-chevron {
  color: #d0d5db;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  transition: transform 0.2s ease;
}

.nex-leg-card.expanded .nex-chevron {
  transform: rotate(180deg);
}

.nex-chevron svg {
  width: 14px;
  height: 14px;
}

.nex-leg-row {
  cursor: pointer;
}

.nex-leg-detail {
  display: none;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--nex-line, #d5ddd4);
}

.nex-leg-card.expanded .nex-leg-detail {
  display: block;
}

.nex-leg-detail .nex-leg-metrics + .nex-leg-metrics {
  margin-top: 4px;
}

.nex-leg-detail .nex-metric span {
  font-size: 9px;
  margin-bottom: 2px;
}

.nex-leg-detail .nex-metric b {
  font-size: 12px;
}

.nex-leg-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  margin: 8px -12px -8px;
  padding: 8px 8px 6px;
  background: #e8f0e6;
}

.nex-leg-act {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: none;
  background: transparent;
  color: var(--nex-primary, #1a6b4a);
  font: inherit;
  font-size: 10px;
  font-weight: 500;
  padding: 2px;
  cursor: pointer;
}

.nex-leg-act svg {
  width: 16px;
  height: 16px;
}

.nex-leg-act.danger {
  color: #e74c3c;
}

.nex-leg-rec-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding-bottom: 88px;
}

.nex-leg-rec .nex-sub-body {
  background: transparent;
}

.nex-leg-rec .nex-rec-card {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

/* ── 汇总卡片 ── */
.nex-rec-summary {
  background: var(--nex-card, #f7f8f5);
  border: 1px solid var(--nex-line, #d5ddd4);
  border-radius: 16px;
  padding: 0;
  margin-bottom: 12px;
  overflow: hidden;
}

.nex-rec-hero {
  padding: 16px 16px 12px;
  background: linear-gradient(135deg, #14201a 0%, #1f3328 100%);
  color: #fff;
}

.nex-rec-hero-main h2 {
  margin: 0 0 10px;
  font-family: var(--nex-display, inherit);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
}

.nex-rec-hero-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nex-rec-hero .nex-rec-side {
  min-width: 24px;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 12px;
}

.nex-rec-hero .nex-rec-side.long {
  background: rgba(255, 138, 0, 0.22);
  color: #ffb347;
}

.nex-rec-hero .nex-rec-side.short {
  background: rgba(231, 76, 60, 0.22);
  color: #ff8a80;
}

.nex-rec-hero .nex-leg-status {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 999px;
}

.nex-rec-hero .nex-leg-status.run {
  background: rgba(200, 245, 66, 0.18);
  color: var(--nex-primary2, #c8f542);
  border: 1px solid rgba(200, 245, 66, 0.35);
}

.nex-rec-hero .nex-leg-status.pause {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.nex-rec-hold-panel {
  padding: 12px 14px;
  background: linear-gradient(180deg, #eef8f2 0%, #e4f2e8 100%);
  border-bottom: 1px solid #c5dfc8;
}

.nex-rec-hold-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nex-rec-hold-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.nex-rec-hold-label {
  font-size: 12px;
  font-weight: 700;
  color: #1a6b4a;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nex-rec-hold-layers {
  font-size: 11px;
  font-weight: 600;
  color: #3d7a55;
  background: rgba(26, 107, 74, 0.1);
  padding: 2px 8px;
  border-radius: 999px;
}

.nex-rec-hold-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.nex-rec-hold-metric {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nex-rec-hold-metric span {
  font-size: 11px;
  color: #5a6b62;
}

.nex-rec-hold-metric b {
  font-size: 15px;
  font-weight: 700;
  color: #14201a;
}

.nex-rec-hold-metric.main b {
  font-size: 16px;
}

.nex-rec-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  padding: 4px 0 8px;
}

.nex-rec-summary-grid > div {
  padding: 10px 12px;
  border-top: 1px solid var(--nex-line, #d5ddd4);
  position: relative;
}

.nex-rec-summary-grid > div:not(:nth-child(3n))::after {
  content: "";
  position: absolute;
  right: 0;
  top: 20%;
  height: 60%;
  width: 1px;
  background: var(--nex-line, #d5ddd4);
}

.nex-rec-summary-grid > div span {
  display: block;
  color: var(--nex-muted, #6a746c);
  font-size: 10px;
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}

.nex-rec-summary-grid > div b {
  font-size: 13px;
  font-weight: 700;
  color: var(--nex-text, #14201a);
}

/* ── Tab ── */
.nex-rec-tabs {
  margin-bottom: 12px;
  gap: 6px;
}

.nex-rec-tabs button {
  flex: 1;
  padding: 8px 0;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--nex-line, #d5ddd4);
  background: var(--nex-card, #f7f8f5);
  color: var(--nex-muted, #6a746c);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.nex-rec-tabs button.active {
  background: var(--nex-ink, #14201a);
  color: var(--nex-primary2, #c8f542);
  border-color: var(--nex-ink, #14201a);
}

/* ── 记录列表（时间轴） ── */
.nex-rec-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 120px;
  overflow-y: auto;
  padding-left: 4px;
}

.nex-rec-card {
  display: flex;
  gap: 0;
  position: relative;
}

.nex-rec-card:last-child .nex-rec-line {
  display: none;
}

.nex-rec-timeline {
  flex-shrink: 0;
  width: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 18px;
}

.nex-rec-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--nex-line, #d5ddd4);
  flex-shrink: 0;
  z-index: 1;
}

.nex-rec-dot.open {
  background: var(--nex-green, #1a8f5c);
  box-shadow: 0 0 0 2px rgba(26, 143, 92, 0.25);
}

.nex-rec-dot.merged {
  background: #3b6fd9;
  box-shadow: 0 0 0 2px rgba(59, 111, 217, 0.25);
}

.nex-rec-dot.closed {
  background: #b0bab2;
  box-shadow: 0 0 0 1px #d5ddd4;
}

.nex-rec-line {
  flex: 1;
  width: 2px;
  background: var(--nex-line, #d5ddd4);
  margin: 4px 0;
  min-height: 12px;
}

.nex-rec-card-inner {
  flex: 1;
  min-width: 0;
  margin: 0 0 12px 8px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--nex-line, #d5ddd4);
  background: #fff;
  transition: box-shadow 0.15s;
}

.nex-rec-card.is-open .nex-rec-card-inner {
  border-color: #b8dfc8;
  background: linear-gradient(180deg, #fff 0%, #f8fcf9 100%);
  box-shadow: 0 2px 12px rgba(26, 107, 74, 0.08);
}

.nex-rec-card.is-closed .nex-rec-card-inner {
  background: var(--nex-card, #f7f8f5);
  opacity: 0.95;
}

.nex-rec-card.is-merged .nex-rec-card-inner {
  border-color: #c5d8f5;
  background: linear-gradient(180deg, #fff 0%, #f5f8ff 100%);
}

.nex-rec-card.sell .nex-rec-card-inner {
  border-color: #ecd5d5;
}

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

.nex-rec-head-left {
  flex: 1;
  min-width: 0;
}

.nex-rec-type-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.nex-rec-order-type {
  font-size: 15px;
  font-weight: 700;
  color: var(--nex-text, #14201a);
}

.nex-rec-side-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.nex-rec-side-tag.long {
  background: #fff4e5;
  color: #ff8a00;
}

.nex-rec-side-tag.short {
  background: #ffecec;
  color: #e74c3c;
}

.nex-rec-time-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.nex-rec-hm {
  font-size: 22px;
  font-weight: 800;
  color: var(--nex-text, #14201a);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.nex-rec-date {
  font-size: 12px;
  color: var(--nex-muted, #6a746c);
  font-weight: 500;
}

.nex-rec-status {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.nex-rec-status.holding {
  background: #e8f7ee;
  color: #1a6b4a;
  border: 1px solid #b8dfc8;
}

.nex-rec-status.cleared {
  background: #eef0f2;
  color: #8b95a5;
  border: 1px solid #dde2e8;
}

.nex-rec-status.merged {
  background: #eef4ff;
  color: #3b6fd9;
  border: 1px solid #c5d8f5;
}

.nex-rec-status.partial {
  background: #fff6e8;
  color: #c47a1a;
  border: 1px solid #f0d4a8;
}

.nex-rec-status.flow,
.nex-rec-dot.flow {
  background: #edf8f0;
  color: #1a7a4a;
  border-color: #b8e6c8;
}

.nex-rec-dot.flow {
  border: 2px solid #1a7a4a;
  background: #c8f542;
}

.nex-rec-status.burn,
.nex-rec-card.special.burn {
  border-color: #f0d4a8;
}

.nex-rec-status.burn {
  background: #fff4e8;
  color: #c45a1a;
  border: 1px solid #f0c898;
}

.nex-rec-dot.burn {
  border: 2px solid #c45a1a;
  background: #ffb347;
}

.nex-rec-card.special.flow {
  border-color: #c8e6b0;
}

/* 核心三指标 */
.nex-rec-highlight {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
  border-radius: 10px;
  background: rgba(20, 32, 26, 0.04);
}

.nex-rec-highlight.sell {
  background: rgba(214, 69, 69, 0.05);
}

.nex-rec-card.is-open .nex-rec-highlight {
  background: rgba(26, 107, 74, 0.07);
}

.nex-rec-hl-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.nex-rec-hl-item span {
  font-size: 10px;
  color: var(--nex-muted, #6a746c);
  white-space: nowrap;
}

.nex-rec-hl-item b {
  font-size: 14px;
  font-weight: 700;
  color: var(--nex-text, #14201a);
  word-break: break-all;
}

.nex-rec-hl-item.nex-rec-hl-float b {
  font-size: 13px;
}

.nex-rec-hl-item.up b {
  color: #1a6b4a;
}

.nex-rec-hl-item.down b {
  color: #d64545;
}

/* 次要明细 */
.nex-rec-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 12px;
}

.nex-rec-detail {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.nex-rec-detail.span2 {
  grid-column: 1 / -1;
}

.nex-rec-detail span {
  font-size: 10px;
  color: var(--nex-muted, #6a746c);
}

.nex-rec-detail b {
  font-size: 12px;
  font-weight: 600;
  color: var(--nex-text, #14201a);
  word-break: break-all;
}

.nex-rec-foot {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--nex-line, #d5ddd4);
  display: flex;
  justify-content: flex-end;
}

.nex-rec-act {
  border: 1px solid var(--nex-primary, #1a6b4a);
  background: #fff;
  color: var(--nex-primary, #1a6b4a);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.nex-rec-act:active {
  background: var(--nex-primary, #1a6b4a);
  color: #fff;
}

.nex-rec-summary-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}

.nex-rec-summary-top h2 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  color: #111;
}

.nex-rec-side {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 18px;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.nex-rec-side.long {
  background: #fff4e5;
  color: #ff8a00;
}

.nex-rec-side.short {
  background: #ffecec;
  color: #e74c3c;
}

.nex-add-price-table {
  margin: 10px 0 4px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f7faf8;
  border: 1px solid #dceee3;
}

.nex-add-price-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 8px;
}

.nex-add-price-head b {
  font-size: 13px;
  color: #1a6b4a;
}

.nex-add-price-head .hint {
  font-size: 11px;
  color: #7a8680;
}

.nex-add-price-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.nex-add-price-table table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 12px;
}

.nex-add-price-table th {
  text-align: left;
  color: #7a8680;
  font-weight: 600;
  font-size: 11px;
  padding: 4px 6px 6px 0;
  white-space: nowrap;
}

.nex-add-price-table td {
  padding: 7px 6px 7px 0;
  vertical-align: middle;
  color: #14201a;
  border-top: 1px solid #e8f0eb;
}

.nex-add-row.next td {
  background: #fffbf2;
}

.nex-add-row.ready td {
  background: #fff8e6;
}

.nex-add-row.done td {
  color: #5a6b62;
}

.nex-add-row td:first-child {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 72px;
}

.nex-add-st {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  width: fit-content;
}

.nex-add-st.done {
  background: #e8f7ee;
  color: #1a6b4a;
}

.nex-add-st.next {
  background: #fff3d6;
  color: #b8860b;
}

.nex-add-st.ready {
  background: #ffe8cc;
  color: #c45c00;
}

.nex-add-st.wait {
  background: #f0f2f5;
  color: #8b95a5;
}

.nex-add-trig {
  font-weight: 700;
  color: #1a6b4a;
}

.nex-add-price-mark {
  margin: 8px 0 0;
  font-size: 12px;
  color: #566057;
}

.nex-add-price-mark b {
  color: #14201a;
  font-size: 13px;
}

.nex-rec-summary .nex-add-price-table {
  margin-top: 12px;
  margin-bottom: 0;
}

.nex-leg-detail .nex-add-price-table {
  margin-top: 8px;
}

.nex-rec-time {
  flex: 1;
  color: #a0a8b3;
  font-size: 12px;
}

.nex-rec-tag {
  font-size: 12px;
  font-weight: 600;
}

.nex-rec-tag.open {
  color: var(--nex-primary, #1a6b4a);
}

.nex-rec-tag.close {
  color: #d64545;
}

.nex-rec-tag.closed {
  color: #8b95a5;
  font-size: 12px;
  font-weight: 600;
}

.nex-rec-tag.partial {
  color: #c47a1a;
  font-size: 12px;
  font-weight: 600;
}

.nex-rec-footer {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: min(430px, 100vw);
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 12px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--nex-line, #d5ddd4);
  box-shadow: 0 -4px 20px rgba(20, 32, 26, 0.08);
  z-index: 30;
}

.nex-rec-footer-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--nex-card, #f7f8f5);
  border: 1px solid var(--nex-line, #d5ddd4);
}

.nex-rec-footer-item span {
  font-size: 11px;
  color: var(--nex-muted, #6a746c);
  font-weight: 500;
}

.nex-rec-footer-item b {
  font-size: 16px;
  font-weight: 800;
  color: var(--nex-text, #14201a);
  letter-spacing: -0.01em;
}

.nex-rec-footer-item b.up {
  color: var(--nex-green, #1a8f5c);
}

.nex-rec-footer-item b.down {
  color: var(--nex-red, #d64545);
}

.nex-leg-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

.nex-metric {
  text-align: center;
}

.nex-metric span {
  display: block;
  color: #9aa49c;
  font-size: 10px;
  margin-bottom: 2px;
}

.nex-metric b {
  font-size: 13px;
  font-weight: 600;
  color: #111;
}

.nex-metric:nth-child(2) b {
  font-size: 13px;
}

.nex-pos .nex-metric b.up {
  color: var(--nex-green);
}

.nex-pos .nex-metric b.down {
  color: var(--nex-red);
}

.nex-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 16px;
  color: var(--nex-muted, #6a746c);
  font-size: 14px;
  background: var(--nex-card, #f7f8f5);
  border-radius: 12px;
  border: 1px solid var(--nex-line, #d5ddd4);
  box-shadow: none;
}

.nex-hist-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin: 0 0 12px;
  overflow: hidden;
}

.nex-hist-panel .nex-leg-list {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 8px;
}

.nex-hist-card .nex-leg-top {
  justify-content: space-between;
}

.nex-hist-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 10px 14px;
  margin-bottom: 10px;
  background: #fff;
  border-radius: 10px;
  font-size: 12px;
  color: var(--nex-muted);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.nex-hist-summary b {
  color: #333;
  font-weight: 700;
}

.nex-hist-card .nex-hist-extra {
  padding-top: 0;
  padding-bottom: 12px;
  border-top: 1px dashed #eef1f5;
  margin-top: -4px;
}

.nex-hist-card .nex-hist-row {
  cursor: default;
}

.nex-hist-card .nex-leg-metrics {
  padding-bottom: 14px;
}

.nex-float-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(68px + env(safe-area-inset-bottom));
  width: min(430px, 100vw - 28px);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  pointer-events: none;
  z-index: 35;
  padding: 0 2px;
}

.nex-float-bar > * {
  pointer-events: auto;
}

.nex-batch-toggle {
  border: 1px solid var(--nex-primary, #1a6b4a);
  background: #fff;
  color: var(--nex-primary, #1a6b4a);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 18px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(26, 107, 74, 0.12);
}

.nex-batch-toggle.open {
  background: var(--nex-primary, #1a6b4a);
  color: #fff;
}

.nex-create-btn {
  border: none;
  background: #c8f542;
  color: #14201a;
  font: inherit;
  font-family: var(--nex-display, "Syne", "Manrope", sans-serif);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(20, 32, 26, 0.18);
  white-space: nowrap;
}

.nex-batch-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px 8px;
}

.nex-batch-count {
  font-size: 13px;
  color: #666;
}

.nex-batch-link {
  border: none;
  background: none;
  color: var(--nex-primary, #1a6b4a);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 4px 6px;
}

.nex-batch-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.nex-leg-card.batch-mode .nex-leg-row {
  cursor: pointer;
}

.nex-leg-card.batch-selected {
  outline: 2px solid rgba(26, 107, 74, 0.45);
  outline-offset: -2px;
}

.nex-leg-check {
  display: flex;
  align-items: center;
  margin-right: 8px;
  flex-shrink: 0;
}

.nex-leg-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--nex-primary, #1a6b4a);
}

.nex-batch-sheet {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(88px + env(safe-area-inset-bottom));
  width: min(360px, calc(100% - 32px));
  background: #fff;
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
  z-index: 36;
}

.nex-batch-sheet[hidden] {
  display: none !important;
}

.nex-batch-item {
  border: none;
  background: #f7f8fa;
  color: #111;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  padding: 12px 16px;
  border-radius: 8px;
  text-align: center;
}

.nex-batch-item:disabled {
  opacity: 0.4;
}

.nex-batch-item.danger {
  color: #ff3b30;
  background: #fff5f4;
}

@media (max-width: 1200px) {
  .layout {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "trade strategy"
      "positions positions"
      "logs logs";
  }
}

@media (max-width: 980px) {
  .ticker, .home-ticker {
    grid-template-columns: 1fr;
  }
  #spark { max-width: none; }
  .equity-grid, .home-eq {
    grid-template-columns: repeat(2, 1fr);
  }
  .layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "trade"
      "strategy"
      "positions"
      "logs";
  }
}

/* NexTrade：覆盖旧壳边距，策略/首页/我的同宽 */
.nex-body .app.shell.nex-app {
  padding-top: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

@media (max-width: 720px) {
  .nex-body .app.shell.nex-app {
    padding-top: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

/* 我的收益：明细 + 分币种 + 日报表 */
.nex-stats-page .nex-sub-body {
  background: transparent;
  min-height: calc(100dvh - var(--nex-app-top-h, 96px) - 44px);
  padding: 12px 14px 24px;
}

.nex-stats-hero {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
  padding: 16px 10px;
  border-radius: 12px;
  background: linear-gradient(135deg, #14201a 0%, #1a6b4a 62%, #245c40 100%);
  color: #f7f8f5;
}

.nex-stats-hero-item {
  text-align: center;
  min-width: 0;
}

.nex-stats-hero-item span {
  display: block;
  font-size: 11px;
  opacity: 0.85;
  margin-bottom: 6px;
}

.nex-stats-hero-item b {
  display: block;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--nex-mono, "JetBrains Mono", monospace);
}

.nex-stats-hero-item b.up { color: #c8f542; }
.nex-stats-hero-item b.down { color: #ff9b9b; }

.nex-stats-panel {
  background: #f7f8f5 !important;
  border: 1px solid #d5ddd4 !important;
  box-shadow: none !important;
  border-radius: 12px;
  padding: 14px 12px 16px;
  margin-bottom: 12px;
}

.nex-stats-page .stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 0;
}

.nex-stats-page .stat {
  background: #eef2eb;
  border: 1px solid #dfe6dd;
  border-radius: 10px;
  padding: 12px 12px 10px;
}

.nex-stats-page .stat .k {
  color: #6a746c;
  font-size: 12px;
  margin-bottom: 6px;
}

.nex-stats-page .stat .v {
  font-size: 15px;
  font-weight: 700;
  color: #14201a;
  line-height: 1.25;
}

.nex-stats-page .stat .v.up { color: #1a8f5c; }
.nex-stats-page .stat .v.down { color: #d64545; }

.nex-stats-page .stats-sub {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  color: #14201a;
}

.nex-stats-page .hint.tiny {
  margin: 0 0 12px;
  color: #6a746c;
}

.st-pager-panel {
  padding-bottom: 12px !important;
}

.st-pager-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  margin-bottom: 12px;
  background: #e3e8e1;
  border-radius: 12px;
}

.st-pager-tabs button {
  border: none;
  background: transparent;
  height: 36px;
  border-radius: 9px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: #6a746c;
  cursor: pointer;
}

.st-pager-tabs button.active {
  background: #14201a;
  color: #c8f542;
}

.st-pager {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 0;
}

.st-pager::-webkit-scrollbar { display: none; }

.st-page {
  flex: 0 0 100%;
  width: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  min-width: 100%;
  box-sizing: border-box;
}

.st-pager-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
}

.st-pager-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c5cec4;
  display: block;
}

.st-pager-dots i.active {
  width: 16px;
  border-radius: 999px;
  background: #1a6b4a;
}

.st-list {
  display: grid;
  gap: 8px;
  max-height: min(48vh, 380px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.st-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e3e9e1;
}

.st-row-main {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  min-width: 0;
}

.st-row-main b {
  font-size: 14px;
  color: #14201a;
}

.st-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 6px;
  background: #eef2eb;
  color: #4d564f;
  font-size: 11px;
  font-weight: 700;
}

.st-time {
  font-size: 12px;
  color: #6a746c;
}

.st-meta {
  font-size: 12px;
  color: #6a746c;
}

.st-day-report {
  max-height: min(48vh, 380px);
  overflow-y: auto;
  display: grid;
  gap: 8px;
  -webkit-overflow-scrolling: touch;
  padding-right: 2px;
}

.st-day-card {
  border: 1px solid #e3e9e1;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.st-day-card > summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: 52px 1fr 72px;
  gap: 8px;
  align-items: center;
  padding: 11px 12px;
  font-size: 13px;
}

.st-day-card > summary::-webkit-details-marker { display: none; }

.st-day-card .d {
  font-weight: 700;
  color: #14201a;
}

.st-day-bar {
  height: 8px;
  border-radius: 999px;
  background: #e8ede6;
  overflow: hidden;
}

.st-day-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #9aa49c;
}

.st-day-bar i.up { background: #1a8f5c; }
.st-day-bar i.down { background: #d64545; }

.st-day-card > summary b {
  text-align: right;
  font-size: 13px;
}

.st-day-body {
  border-top: 1px solid #eef2eb;
  padding: 8px 12px 10px;
  display: grid;
  gap: 6px;
  background: #fafbf8;
}

.st-day-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: #4d564f;
}

.st-day-empty {
  margin: 0;
  font-size: 12px;
  color: #9aa49c;
}

.nex-stats-page .day-row .d {
  color: #8a94a6;
}

.nex-stats-page .day-row .bar-track {
  height: 8px;
  background: #eef1f5;
  border-radius: 999px;
  overflow: hidden;
}

.nex-stats-page .day-row .bar.up {
  background: #16c784;
}

.nex-stats-page .day-row .bar.down {
  background: #ea3943;
}

.nex-stats-page .day-row .n {
  text-align: right;
  font-family: var(--mono);
  color: #333;
  font-weight: 600;
}

.nex-stats-page .day-row .n.up {
  color: #16c784;
}

.nex-stats-page .day-row .n.down {
  color: #ea3943;
}

/* NexTrade 子页（开仓/参数）：修正深色主题样式泄漏，提升可读性 */
.nex-sub {
  color: #222;
}

.nex-sub .hint,
.nex-sub .hint.tiny {
  color: #666;
}

.nex-sub .form label,
.nex-sub .strat-form label {
  color: #333;
  font-weight: 500;
}

.nex-sub input,
.nex-sub select,
.nex-sub textarea,
.nex-sub .strat-form select,
.nex-sub .strat-form input {
  background: #fff;
  color: #111;
  border: 1px solid #dce3ec;
}

.nex-sub input::placeholder {
  color: #aab4c0;
}

.profile-form .profile-readonly-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
  border-radius: 12px;
  background: #f4f6f8;
  border: 1px solid #e8edf2;
}

.profile-form .profile-readonly-label {
  font-size: 14px;
  color: #6b7680;
  font-weight: 500;
  flex-shrink: 0;
}

.profile-form .profile-readonly-val {
  font-size: 15px;
  color: #2a3138;
  font-weight: 600;
  text-align: right;
  word-break: break-all;
}

.profile-form .profile-nick-label {
  display: block;
  margin-top: 6px;
  margin-bottom: 0;
  color: #333;
  font-weight: 500;
}

.profile-form .profile-nick-input {
  display: block;
  width: 100%;
  margin-top: 8px;
  height: 48px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid #dce3ec;
  background: #fff;
  color: #111;
  font: inherit;
  font-size: 15px;
  box-sizing: border-box;
}

.profile-form .profile-nick-input:focus {
  outline: none;
  border-color: var(--nex-primary, #1a6b4a);
  box-shadow: 0 0 0 3px rgba(26, 107, 74, 0.12);
}

.nex-sub .unit {
  color: #666;
}

.nex-sub .mode-tabs .tab {
  background: #f3f5f8;
  color: #555;
  border: 1px solid #dce3ec;
}

.nex-sub .mode-tabs .tab.active {
  background: #fff;
  color: var(--nex-primary, #1a6b4a);
  border-color: var(--nex-primary, #1a6b4a);
  font-weight: 600;
}

.nex-sub .quick button {
  background: #f3f5f8;
  color: #333;
  border: 1px solid #dce3ec;
}

.nex-sub button.ghost {
  background: #fff;
  color: var(--nex-primary, #1a6b4a);
  border: 1px solid #c5d9c8;
  font-weight: 600;
}

.nex-sub button.ghost.danger {
  color: #e74c3c;
  border-color: #ffc9c9;
  background: #fff;
}

.nex-sub .long-only {
  background: #e8f8ef;
  border-color: #9eddb8;
  color: #0d9f5a;
  font-weight: 600;
}

.nex-sub .short-only {
  background: #ffecec;
  border-color: #ffb8b8;
  color: #e03e3e;
  font-weight: 600;
}

.nex-sub .preview {
  background: #eef5ec;
  border: 1px solid var(--nex-line, #d5ddd4);
  color: #333;
}

.nex-sub .preview span {
  color: #666;
}

.nex-sub .preview b {
  color: #111;
  font-weight: 600;
}

.nex-sub .preview b.up {
  color: #0d9f5a;
}

.nex-sub .preview b.down {
  color: #e03e3e;
}

.nex-sub table th {
  color: #666;
  background: #f7f9fc;
}

.nex-sub table td {
  color: #222;
}

.nex-sub .add-plan-wrap {
  border-color: #e8ebf0;
  background: #fff;
}

.nex-sub .add-plan-wrap thead th {
  background: #f5f7fa;
  color: #666;
}

.nex-sub .add-plan-wrap input[type="number"] {
  background: #fff;
  color: #111;
  border: 1px solid #dce3ec;
}

.nex-sub .sym-box input.symbol-input {
  background: #fff;
  color: #111;
}

/* 对齐「我的收益」：Tab / 排行榜涨跌色 / 浅色下拉 */
.nex-rank-tabs,
.page.nex-pos .nex-tabs,
.nex-rec-tabs {
  display: flex !important;
  gap: 4px !important;
  padding: 4px !important;
  margin: 0 14px 12px !important;
  background: #e3e8e1 !important;
  border-radius: 12px !important;
}
.page.nex-pos .nex-tabs {
  margin: 0 0 10px !important;
}
.nex-rank-tabs button,
.page.nex-pos .nex-tabs button,
.nex-rec-tabs button,
.nex-tabs button {
  color: #566057 !important;
  background: transparent !important;
  box-shadow: none !important;
  -webkit-text-fill-color: #566057;
}
.nex-rank-tabs button.active,
.page.nex-pos .nex-tabs button.active,
.nex-rec-tabs button.active,
.nex-tabs button.active {
  background: #14201a !important;
  color: #c8f542 !important;
  -webkit-text-fill-color: #c8f542;
  box-shadow: none !important;
}
.nex-rank-top .val.up,
.nex-rank-row .val.up,
.nex-rank-self b.mono.up {
  color: #1a8f5c !important;
}
.nex-rank-top .val.down,
.nex-rank-row .val.down,
.nex-rank-self b.mono.down {
  color: #d64545 !important;
}
.nex-body .sym-drop {
  background: #f7f8f5 !important;
  border: 1px solid #d5ddd4 !important;
  box-shadow: 0 8px 24px rgba(20, 32, 26, 0.12) !important;
}
.nex-body .sym-drop button {
  color: #14201a !important;
  border-bottom-color: #e8ede6 !important;
}
.nex-body .sym-drop .sym-sec,
.nex-body .sym-drop .muted {
  color: #6a746c !important;
}
.nex-body .sym-drop .muted.up {
  color: #1a8f5c !important;
}
.nex-body .sym-drop .muted.down {
  color: #d64545 !important;
}
.nex-body .sym-drop .tag {
  color: #1a6b4a !important;
}
.dir.long {
  color: #1a8f5c !important;
}
.dir.long::before {
  background: #1a8f5c !important;
}
.dir.short {
  color: #d64545 !important;
}
.dir.short::before {
  background: #d64545 !important;
}

.invite-panel .invite-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.invite-stat {
  padding: 12px 14px;
  border-radius: 12px;
  background: #f4f6f8;
  border: 1px solid #e8edf2;
  text-align: center;
}

.invite-stat span {
  display: block;
  font-size: 12px;
  color: #6b7680;
  margin-bottom: 4px;
}

.invite-stat b {
  font-size: 22px;
  color: #111;
}

.invite-code-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.invite-code-row {
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e8edf2;
}

.invite-code-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.invite-code-val {
  font-size: 18px;
  letter-spacing: 0.08em;
}

.invite-code-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.invite-code-actions .nex-btn-outline.tiny {
  padding: 6px 10px;
  font-size: 12px;
}

.invite-section-head {
  margin-bottom: 10px;
}

.invite-gen-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.invite-gen-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eef6f0;
  border: 1px solid #cfe8d4;
  font-size: 12px;
  color: #1a5c2e;
}

.invite-gen-chip b {
  font-size: 14px;
  color: #111;
}

.invite-tabs {
  display: flex;
  gap: 8px;
  margin: 12px 0 10px;
}

.invite-tab {
  flex: 1;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #e8edf2;
  background: #fff;
  color: #6b7680;
  font-size: 13px;
}

.invite-tab.active {
  background: #111;
  border-color: #111;
  color: #fff;
}

.invite-member-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.invite-member-row {
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e8edf2;
}

.invite-member-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.invite-member-name {
  font-size: 15px;
  font-weight: 600;
  color: #111;
  word-break: break-all;
}

.invite-member-gen {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f4f6f8;
  border: 1px solid #e8edf2;
  font-size: 11px;
  color: #6b7680;
}

.invite-member-gen.direct {
  background: #eef6f0;
  border-color: #cfe8d4;
  color: #1a5c2e;
}

.invite-member-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12px;
  color: #6b7680;
}

.invite-member-meta .mono {
  color: #334;
}

.nex-auth-invite.hidden {
  display: none;
}

.wallet-balance-card {
  text-align: center;
  padding: 18px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, #111 0%, #1a2e1a 100%);
  color: #fff;
  margin-bottom: 14px;
}

.wallet-balance-label {
  display: block;
  font-size: 12px;
  opacity: 0.75;
  margin-bottom: 6px;
}

.wallet-balance-val {
  font-size: 32px;
  color: #5fe37a;
  letter-spacing: 0.02em;
}

.wallet-balance-card .hint {
  color: rgba(255, 255, 255, 0.65);
  margin-top: 8px;
}

.wallet-rules p {
  margin: 4px 0;
}

.wallet-section {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e8edf2;
}

.wallet-section label {
  display: block;
  margin-bottom: 10px;
  font-size: 13px;
  color: #4a5560;
}

.wallet-input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #dce3ec;
  background: #fff;
  font-size: 15px;
  box-sizing: border-box;
}

.wallet-ledger-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wallet-ledger-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e8edf2;
}

.wallet-ledger-main,
.wallet-ledger-side {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wallet-ledger-side {
  text-align: right;
  flex-shrink: 0;
}
