/* 精简版 · 手机壳增量样式（基座 nextrade.css） */

.hidden { display: none !important; }

.portal:not(.hidden) { display: flex !important; }
#app.hidden { display: none !important; }
#app:not(.hidden) { display: block !important; }

.slim-tabbar {
  grid-template-columns: repeat(4, 1fr) !important;
}

.slim-warn {
  color: var(--nex-orange);
  font-size: 12px;
  margin: 8px 0 12px;
  line-height: 1.45;
}

.slim-reg-btn {
  width: 100%;
  margin-top: 10px;
}

.msg:not(:empty) { display: block; }
.msg.err { color: var(--nex-red) !important; }
.msg:not(.err):not(:empty) { color: var(--nex-green) !important; }

.slim-banner h2 { font-size: 1.15rem; }
.slim-notice {
  margin: 0 14px 12px;
  border-radius: 12px;
  background: var(--nex-card);
  border: 1px solid var(--nex-line);
  padding: 10px 12px;
}

.slim-home-notices {
  margin: 0 14px 10px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e3ebe0;
  overflow: hidden;
}

.slim-home-notices-head {
  padding: 6px 10px 0;
}

.slim-home-notices-head .nex-notice-pin-tag {
  margin: 0;
}

.slim-notice-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  gap: 0 8px;
  align-items: center;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-top: 1px solid #f0f3ef;
  background: transparent;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.slim-notice-row:first-of-type {
  border-top: none;
}

.slim-notice-row:active {
  background: #f8faf7;
}

.slim-notice-promo .slim-notice-row-title {
  color: #1a7a4a;
}

.slim-notice-logic .slim-notice-row-title {
  color: #1a5a8a;
}

.slim-notice-row-title {
  grid-column: 1;
  grid-row: 1 / 3;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  align-self: center;
}

.slim-notice-row-sub {
  grid-column: 2;
  grid-row: 1 / 3;
  font-size: 11px;
  color: #6b7a71;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slim-notice-row-more {
  grid-column: 3;
  grid-row: 1 / 3;
  font-size: 16px;
  color: #9aa89f;
  font-weight: 600;
  line-height: 1;
}

.slim-home-promo {
  cursor: pointer;
  background: linear-gradient(180deg, #f3f8ea 0%, #fff 100%);
  border-color: #d7e6c0;
}

.slim-home-logic {
  margin-top: -4px;
  background: linear-gradient(180deg, #eef6ff 0%, #fff 100%);
  border-color: #c8ddf0;
}

.slim-logic-preview {
  font-family: var(--nex-mono, monospace);
  letter-spacing: 0.02em;
}

.slim-logic-tags {
  display: block;
  font-size: 12px;
  color: #1a5a8a;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 8px;
  background: #eef6ff;
  border: 1px solid #c8ddf0;
  line-height: 1.6;
  margin: 0 0 14px;
}

.slim-home-promo .nex-notice-pin-tag {
  margin-bottom: 6px;
}

.slim-promo-title {
  display: block;
  font-size: 14px;
  color: #1a2e22;
  margin: 0 0 4px;
}

.slim-home-promo .nex-notice-txt {
  -webkit-line-clamp: 3;
}

.slim-promo-dialog {
  max-height: min(85vh, 680px);
}

.slim-promo-body {
  padding: 12px 16px 20px;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.65;
  color: #33443a;
}

.slim-promo-body h4 {
  margin: 16px 0 8px;
  font-size: 14px;
  color: #1a2e22;
}

.slim-promo-body h4:first-child {
  margin-top: 0;
}

.slim-promo-lead {
  margin: 0 0 10px;
}

.slim-promo-highlights {
  margin: 0 0 12px;
  padding-left: 18px;
  color: #33443a;
}

.slim-promo-highlights li {
  margin: 4px 0;
}

.slim-promo-example {
  margin: 8px 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f6faf4;
  border: 1px solid #e3ebe0;
}

.slim-promo-rates {
  margin: 8px 0 10px;
  padding-left: 18px;
}

.slim-promo-rates li {
  margin: 6px 0;
}

.slim-promo-list {
  margin: 0;
  padding-left: 18px;
}

.slim-promo-list li {
  margin: 8px 0;
}

.slim-promo-goto {
  width: 100%;
  margin-top: 16px;
  padding: 12px;
  border: none;
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.slim-bot-line {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--nex-muted);
}

.slim-section-title {
  margin: 16px 0 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--nex-muted);
}

.page.nex-pos .slim-section-title {
  margin-left: 0;
  margin-right: 0;
}

.slim-toolbar {
  padding: 8px 0 0;
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.slim-filter {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.slim-filter-label {
  font-size: 12px;
  color: var(--nex-muted);
  font-weight: 600;
}

.slim-filter select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--nex-line);
  background: #fff;
  font: inherit;
}

.slim-mini-btn {
  height: 42px;
  padding: 0 14px;
  white-space: nowrap;
}

.slim-summary { margin: 10px 14px 0; }

.slim-cards {
  padding: 0;
  gap: 10px;
}

.slim-toolbar-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
  margin: 10px 0;
}

.slim-check {
  display: flex !important;
  align-items: center;
  gap: 8px;
  flex-direction: row !important;
}
.slim-check input { width: auto !important; margin: 0 !important; }

.slim-fieldset {
  border: 1px solid var(--nex-line);
  border-radius: 12px;
  padding: 10px 12px;
  margin: 12px 0;
}
.slim-fieldset legend {
  font-size: 13px;
  font-weight: 700;
  color: var(--nex-muted);
  padding: 0 4px;
}

/* 表单 */
.nex-panel .form label {
  display: block;
  margin: 10px 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--nex-muted);
}
.nex-panel .form input,
.nex-panel .form select {
  width: 100%;
  margin-top: 6px;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--nex-line);
  background: #fff;
  color: var(--nex-text);
  font: inherit;
}

.mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 12px 0;
  padding: 4px;
  background: #e3e8e1;
  border-radius: 12px;
}
.mode-tabs .tab {
  border: none;
  background: transparent;
  height: 38px;
  border-radius: 9px;
  font: inherit;
  font-weight: 700;
  color: var(--nex-muted);
  cursor: pointer;
}
.mode-tabs .tab.active {
  background: var(--nex-ink);
  color: var(--nex-primary2);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 360px) {
  .split { grid-template-columns: 1fr; }
}

.side-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}
.side-btns .cta.dual,
.side-btns .full,
.side-btns .primary:only-child {
  grid-column: 1 / -1;
}
.side-btns button {
  border: none;
  border-radius: 12px;
  padding: 12px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.side-btns .primary,
.side-btns .cta.dual {
  background: var(--nex-ink);
  color: var(--nex-primary2);
}
.side-btns .long-only {
  background: rgba(26, 143, 92, 0.12);
  color: var(--nex-green);
  border: 1px solid rgba(26, 143, 92, 0.35);
}
.side-btns .short-only {
  background: rgba(214, 69, 69, 0.1);
  color: var(--nex-red);
  border: 1px solid rgba(214, 69, 69, 0.3);
}
.side-btns .ghost {
  background: #fff;
  border: 1px solid var(--nex-line);
  color: #566057;
}
.side-btns .ghost.danger {
  color: var(--nex-red);
  border-color: #f0c8c8;
}

.preview {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f4f7f2;
  border: 1px solid #e3ebe0;
  font-size: 13px;
  line-height: 1.55;
  color: #33443a;
}

.preview .pv-main {
  font-weight: 600;
  color: #14201a;
}

.preview .pv-cost {
  margin-top: 6px;
  font-size: 12px;
  color: #1a6b4a;
  font-weight: 500;
}

.preview .pv-cost.hidden {
  display: none;
}

.slim-tag.warn {
  background: #fff3e0;
  color: #b45309;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 6px;
}

.slim-ploy-msg {
  margin: 0 16px 12px;
  text-align: center;
}

.slim-leg-card.paused {
  opacity: 0.88;
  border-color: #f0c674;
}

.slim-sym-box {
  position: relative;
  width: 100%;
}

.slim-sym-box .symbol-input {
  width: 100%;
  box-sizing: border-box;
}

.sym-drop {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 280px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--nex-line);
  border-radius: 12px;
  z-index: 40;
  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;
  font: inherit;
  cursor: pointer;
}

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

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

.sym-drop .tag {
  color: #1a6b4a;
  font-size: 11px;
}

.add-plan-wrap {
  margin: 10px 0 14px;
  padding: 10px;
  border: 1px solid var(--nex-line);
  border-radius: 12px;
  background: #eef2eb;
}
.add-plan {
  display: grid;
  grid-template-columns: 36px 1fr 1fr;
  gap: 6px;
  font-size: 12px;
  max-height: 360px;
  overflow: auto;
}
.add-plan input {
  margin: 0 !important;
  padding: 8px !important;
}

.ghost.full {
  width: 100%;
  margin: 8px 0;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--nex-line);
  background: #fff;
  font: inherit;
  cursor: pointer;
}

/* 持仓卡片 */
.cards { display: flex; flex-direction: column; }
.card-row {
  background: var(--nex-card);
  border: 1px solid var(--nex-line);
  border-radius: 12px;
  padding: 12px;
  font-size: 13px;
  line-height: 1.5;
}
.card-row.long { border-left: 3px solid var(--nex-green); }
.card-row.short { border-left: 3px solid var(--nex-red); }
.card-row.warn { border-color: var(--nex-orange); }
.card-row .title { font-weight: 700; margin-bottom: 6px; }
.card-row .meta { color: var(--nex-muted); font-size: 12px; }
.card-row .tag {
  display: inline-block;
  margin-right: 6px;
  padding: 2px 7px;
  border-radius: 6px;
  background: #e3e8e1;
  font-size: 11px;
  font-weight: 600;
}
.card-row .tag.ok { background: #dcefe4; color: var(--nex-green); }
.card-row .tag.bad { background: #fde8e8; color: var(--nex-red); }

/* 事件日志报表 */
.slim-log-table-wrap {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--nex-line);
  border-radius: 10px;
  background: var(--nex-card);
  max-height: min(72vh, calc(100dvh - 168px));
}
.slim-log-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 9px;
  line-height: 1.2;
  table-layout: fixed;
}
.slim-log-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 4px 3px;
  text-align: left;
  font-weight: 600;
  color: var(--nex-muted);
  background: #f3f5f2;
  border-bottom: 1px solid var(--nex-line);
  white-space: nowrap;
  font-size: 8px;
}
.slim-log-table thead th.num { text-align: right; }
.slim-log-table tbody td {
  padding: 3px 3px;
  border-bottom: 1px solid #eef1ec;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 9px;
}
.slim-log-table tbody tr:last-child td { border-bottom: none; }
.slim-log-row.long { background: rgba(26, 107, 74, 0.035); }
.slim-log-row.short { background: rgba(198, 40, 40, 0.035); }
.slim-log-time {
  width: 58px;
  color: var(--nex-muted);
  font-variant-numeric: tabular-nums;
}
.slim-log-type { width: 72px; font-weight: 600; }
.slim-log-kind {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 3px;
  border-radius: 2px;
  background: #e8ece6;
  font-size: 8px;
  font-weight: 600;
  color: #445048;
  line-height: 1.45;
}
.slim-log-kind.tp,
.slim-log-kind.close { background: #dcefe4; color: var(--nex-green); }
.slim-log-kind.add { background: #e3eefc; color: #2f6fed; }
.slim-log-kind.loop,
.slim-log-kind.open { background: #eceff3; color: #5a635c; }
.slim-log-kind.sl,
.slim-log-kind.burn { background: #fde8e8; color: var(--nex-red); }
.slim-log-sym {
  width: 44px;
  font-weight: 700;
}
.slim-log-side {
  width: 18px;
  font-weight: 700;
  text-align: center;
}
.slim-log-side.long { color: var(--nex-green); }
.slim-log-side.short { color: var(--nex-red); }
.slim-log-pnl {
  width: 52px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.slim-log-pnl.pos { color: var(--nex-green); }
.slim-log-pnl.neg { color: var(--nex-red); }
.slim-log-pts {
  width: 46px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: #8a6a2f;
}
.slim-log-px {
  width: 52px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--nex-muted);
}
.slim-log-sz {
  width: 40px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.slim-log-note {
  width: 160px;
  max-width: 220px;
  color: var(--nex-text);
  white-space: nowrap;
}
.slim-log-num { text-align: right; white-space: nowrap; font-size: 9px; }
.slim-log-empty {
  padding: 24px 12px !important;
  text-align: center;
  color: var(--nex-muted);
  white-space: normal !important;
}
.slim-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
  padding: 8px 0;
}
.slim-pager-info { font-size: 12px; color: var(--nex-muted); min-width: 88px; text-align: center; }
.slim-pager-btn { min-width: 72px; padding: 6px 12px; font-size: 12px; }
.slim-pager-btn:disabled { opacity: 0.45; cursor: not-allowed; }


.pnl-pos { color: var(--nex-green) !important; font-weight: 700; }
.pnl-neg { color: var(--nex-red) !important; font-weight: 700; }

.overview-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  padding: 8px 0;
  border-top: 1px solid var(--nex-line);
  cursor: pointer;
}
.overview-row:first-of-type { border-top: 0; }
.overview-row.active { background: #eef2eb; margin: 0 -8px; padding: 8px; border-radius: 8px; }

.leg-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 8px;
}
.leg-block {
  background: #f3f5f2;
  border: 1px solid var(--nex-line);
  border-radius: 10px;
  padding: 10px;
  font-size: 12px;
  line-height: 1.45;
}
.leg-block.long { border-left: 3px solid var(--nex-green); }
.leg-block.short { border-left: 3px solid var(--nex-red); }
.leg-block.warn { border-color: var(--nex-orange); }
.leg-block.empty { opacity: 0.65; }
.leg-block .title { font-weight: 700; margin-bottom: 4px; }

.layer-details summary {
  cursor: pointer;
  color: var(--nex-muted);
  font-size: 12px;
  margin-top: 6px;
}

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

.box {
  background: #0d1218;
  color: #c8d0c4;
  border: 1px solid var(--nex-line);
  border-radius: 10px;
  padding: 10px;
  overflow: auto;
  max-height: 240px;
  font-size: 11px;
  line-height: 1.4;
  white-space: pre-wrap;
  margin-top: 10px;
}

.inline-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  min-width: 140px;
}
.inline-label select {
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--nex-line);
  background: #fff;
}

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

/* 顶栏占位：与 header / 页面渐变同色，避免出现白条 */
.nex-app-top-spacer {
  background: #14201a;
}

.page.nex-home.active {
  margin-top: calc(-1 * var(--nex-app-top-h, 96px));
  padding-top: calc(12px + var(--nex-app-top-h, 96px));
}

.page.nex-mine.active {
  margin-top: calc(-1 * var(--nex-app-top-h, 96px));
  padding-top: 0;
}

.page.nex-pos.active {
  margin-top: calc(-1 * var(--nex-app-top-h, 96px));
  padding-top: calc(4px + var(--nex-app-top-h, 96px));
}

#app.nex-pos-mode {
  background: transparent;
}

.page.nex-pos {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0 14px calc(16px + var(--nex-tab-h) + env(safe-area-inset-bottom));
  min-height: calc(100dvh - var(--nex-tab-h) - 96px);
  background:
    linear-gradient(180deg, #14201a 0%, #1a6b4a 88px, #c5d9c8 145px, #eef1ec 210px, #eef1ec 100%);
}

.page.nex-pos.active {
  display: flex !important;
  flex-direction: column;
  min-height: calc(100dvh - var(--nex-tab-h) - 96px);
}

.page.nex-pos .nex-header.slim-toolbar,
.page.nex-pos .slim-pos-toolbar {
  flex-shrink: 0;
  padding: 10px 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.slim-pos-pill {
  box-sizing: border-box;
  height: 36px;
  margin: 0;
  padding: 0 14px;
  border-radius: 999px;
  border: none;
  font: inherit;
  font-family: var(--nex-display, "Syne", "Manrope", sans-serif);
  font-size: 13px;
  font-weight: 700;
  line-height: 36px;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(20, 32, 26, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.slim-pos-pill:active {
  transform: scale(0.98);
}

.slim-pos-filter {
  flex: 1;
  min-width: 0;
  padding: 0;
  background: #fff;
  color: #14201a;
  overflow: hidden;
}

.slim-pos-filter select {
  width: 100%;
  height: 36px;
  margin: 0;
  padding: 0 14px;
  border: none;
  outline: none;
  background: transparent;
  color: inherit;
  font: inherit;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2314201a' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 28px;
}

.slim-pos-ghost {
  flex-shrink: 0;
  background: #fff;
  color: #14201a;
}

.slim-pos-create {
  flex-shrink: 0;
  background: #c8f542;
  color: #14201a;
}

.slim-toolbar-actions {
  display: none;
}

.slim-pos-stats {
  flex-shrink: 0;
  margin: 0 0 6px;
  padding: 8px 4px 6px;
}

.slim-pos-stats .nex-sum-item b {
  font-size: 14px;
}

.slim-pos-stats .nex-sum-item span {
  font-size: 10px;
}

.slim-overview {
  flex-shrink: 0;
  margin-bottom: 6px;
}

.slim-pos-hint {
  font-size: 11px;
  color: var(--nex-muted);
}

.slim-bot-toggle.off {
  border-color: rgba(160, 170, 165, 0.45);
  background: rgba(120, 130, 125, 0.12);
  color: #a8b0aa;
}

.slim-params-summary {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #eef2eb;
  border: 1px solid var(--nex-line);
  font-size: 12px;
  line-height: 1.5;
  color: #3d463f;
  word-break: break-all;
}

.slim-create-note {
  margin: 4px 0 10px;
  color: var(--nex-muted);
}

.slim-filter-hint {
  margin: -4px 14px 8px;
  color: var(--nex-muted);
}

.slim-mine-meta {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.45;
}

.slim-mine-meta.muted {
  color: var(--nex-muted);
  font-size: 11px;
}

.slim-key-status {
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.slim-keys-page .nex-panel {
  padding: 16px;
}

.slim-keys-bot-note {
  margin-top: 6px !important;
  color: #6b7a71 !important;
}

.slim-trade-plat {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 8px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #dceee0;
  background: linear-gradient(135deg, #eef8f0, #f8fbf8);
}

.slim-trade-plat.ready {
  border-color: #b8dfc4;
}

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

.slim-trade-plat-ico {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 15px;
  color: #fff;
  background: #1a6b4a;
}

.slim-trade-plat-ico.plat-bn { background: #c9a227; color: #1a1508; }
.slim-trade-plat-ico.plat-gate { background: #17a17a; }

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

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

.slim-trade-plat-meta .hint {
  margin: 0;
  color: #6b7a71;
  line-height: 1.35;
}

.slim-trade-plat-switch {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.slim-trade-plat-opt {
  border: 1px solid #d5e5d8;
  background: #fff;
  border-radius: 8px;
  padding: 8px 0;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: #4a5c52;
  cursor: pointer;
}

.slim-trade-plat-opt.active {
  background: #1a6b4a;
  border-color: #1a6b4a;
  color: #fff;
}

.slim-trade-plat-link {
  display: block;
  width: 100%;
  margin: 0 0 14px;
  border: 0;
  background: transparent;
  color: #1a6b4a;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 0 2px 4px;
  text-align: right;
  cursor: pointer;
}

.slim-key-mode-tag {
  display: inline-block;
  margin: 0 0 4px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #1a7a4a;
  background: #eef8f0;
  border: 1px solid #cfe8d4;
}

.slim-keys-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 12px 0 16px;
}

.slim-key-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  font-size: 13px;
  color: #33443a;
}

.slim-key-field > span {
  font-size: 12px;
  font-weight: 600;
  color: #6b7a71;
}

.slim-key-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid #e3ebe0;
  font: inherit;
  font-size: 14px;
  background: #fff;
  color: #1a2e22;
}

.slim-key-field input::placeholder {
  color: #b0bab4;
  font-size: 13px;
}

.slim-keys-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.slim-keys-actions button {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.slim-keys-actions .primary {
  border: none;
  background: #1a2e22;
  color: #fff;
}

.slim-keys-actions .ghost {
  border: 1px solid #d8e0d8;
  background: #fff;
  color: #33443a;
}

.slim-key-tabs {
  display: flex;
  gap: 8px;
  margin: 14px 0 12px;
}

.slim-key-tab {
  flex: 1;
  border: 1px solid #e3ebe0;
  background: #fff;
  color: #33443a;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 10px 6px;
  border-radius: 10px;
  cursor: pointer;
}

.slim-key-tab.active {
  border-color: #1a7a4a;
  background: #eef8f0;
  color: #1a7a4a;
}

.slim-key-overview {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #eef2ee;
}

.slim-key-overview-head {
  font-size: 11px;
  color: #9aa89f;
  margin-bottom: 8px;
}

.slim-key-overview-row {
  display: block;
  font-size: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f3f6f2;
}

.slim-key-overview-line1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.slim-key-overview-line2 {
  padding-left: 0;
}

.slim-key-overview-row:last-child {
  border-bottom: none;
}

.slim-key-overview-row.active {
  color: #1a7a4a;
}

.slim-key-overview-row .name {
  font-weight: 600;
}

.slim-key-overview-row .stat.ok {
  color: #1a7a4a;
  flex-shrink: 0;
}

.slim-key-overview-row .stat.no {
  color: #9aa89f;
  flex-shrink: 0;
}

.slim-key-overview-row .mask {
  display: block;
  color: #6b7a71;
  font-size: 11px;
  word-break: break-all;
}

#passphraseWrap.hidden {
  display: none;
}

.slim-empty-state {
  text-align: center;
  padding: 32px 16px 24px;
}

.slim-empty-state .nex-empty {
  margin: 0;
  color: var(--nex-muted, #6b7a72);
  font-size: 14px;
}

.slim-empty-goto {
  margin-top: 16px;
  display: inline-block;
  min-width: 140px;
}

.slim-bot-toggle {
  border: 1px solid rgba(200, 245, 66, 0.55);
  background: rgba(200, 245, 66, 0.18);
  color: #c8f542;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

.slim-bot-toggle:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.55);
}

.slim-bot-toggle.on {
  border-color: rgba(255, 120, 120, 0.45);
  background: rgba(214, 69, 69, 0.15);
  color: #ffb4b4;
}

.slim-bot-toggle:disabled {
  opacity: 0.6;
  cursor: wait;
}

.nex-app-top .top-meta {
  align-items: center;
  gap: 6px;
}

.slim-leg-rec-sum {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--nex-text);
}

.slim-leg-actions {
  margin-top: 10px;
  padding: 12px;
}

.slim-leg-action-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.slim-leg-action-row .slim-mini-btn {
  flex: 1;
  min-width: 72px;
}

.slim-leg-action-row .slim-mini-btn.danger,
.nex-btn-outline.danger {
  color: var(--nex-red, #c62828);
  border-color: rgba(198, 40, 40, 0.45);
}

.slim-leg-edit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 8px;
}

.slim-leg-edit-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: var(--nex-muted, #667);
}

.slim-leg-edit-grid input {
  width: 100%;
  border: 1px solid var(--nex-line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14px;
  background: #fff;
}

#btnLegSaveSettings {
  width: 100%;
  margin-top: 2px;
}

#legRecMsg {
  margin-top: 8px;
}

.slim-section-mini {
  margin: 8px 0 6px;
  font-size: 12px;
}

.slim-pos-stats .nex-sum-item b.up { color: var(--nex-green); }
.slim-pos-stats .nex-sum-item b.down { color: var(--nex-red); }

.slim-trades-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

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

@media (max-width: 360px) {
  .page.nex-pos .nex-summary-card.slim-pos-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 8px;
  }
  .page.nex-pos .nex-summary-card.slim-pos-stats .nex-sum-item:nth-child(2)::after {
    display: none;
  }
}

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

.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);
}

.nex-summary-card .nex-sum-item b {
  display: block;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 4px;
}

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

.slim-overview {
  flex-shrink: 0;
  margin-bottom: 8px;
}

.nex-leg-panel.slim-pos-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 0 12px;
}

.page.nex-pos .slim-section-title {
  margin: 12px 0 8px;
}

.page.nex-pos .slim-cards {
  padding: 0;
}

.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;
  cursor: pointer;
}

.nex-batch-toggle {
  border: 1px solid var(--nex-primary);
  background: #fff;
  color: var(--nex-primary);
  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);
  cursor: pointer;
}

.nex-batch-toggle.danger {
  border-color: rgba(214, 69, 69, 0.45);
  color: var(--nex-red);
  background: #fff;
}

.nex-btn-outline {
  border: 1px solid var(--nex-line);
  background: #fff;
  border-radius: 10px;
  font: inherit;
  font-size: 13px;
  color: #566057;
  cursor: pointer;
}

/* 持仓 · 单腿卡片 */
.slim-leg-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.slim-leg-card {
  background: var(--nex-card);
  border: 1px solid var(--nex-line);
  border-radius: 10px;
  padding: 7px 10px;
  cursor: pointer;
  transition: transform 0.12s ease;
  outline: none;
}

.slim-leg-card.compact .slim-leg-row1 {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 2px;
}

.slim-leg-card.compact .slim-leg-pair {
  font-size: 13px;
  font-weight: 700;
}

.slim-leg-card.compact .slim-tag {
  font-size: 10px;
  padding: 0 5px;
  line-height: 18px;
}

.slim-leg-card.compact .slim-leg-qty {
  font-size: 11px;
  color: var(--nex-muted);
}

.slim-leg-right {
  margin-left: auto;
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-shrink: 0;
  text-align: right;
}

.slim-leg-ret {
  font-size: 11px;
  font-weight: 700;
}

.slim-leg-card.compact .slim-leg-float {
  font-size: 13px;
  font-weight: 700;
}

.slim-leg-card.compact .slim-leg-row2 {
  font-size: 10px;
  color: var(--nex-muted);
  line-height: 1.35;
}

.slim-leg-card:active {
  transform: scale(0.985);
}

.slim-leg-card.long {
  border-left: 2px solid var(--nex-green);
}

.slim-leg-card.short {
  border-left: 2px solid var(--nex-red);
}

.slim-leg-card.hist {
  cursor: default;
}

.slim-leg-card.hist[data-open-leg] {
  cursor: pointer;
}

.slim-trade-scroll {
  max-height: min(68vh, calc(100dvh - 220px));
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--nex-line);
  border-radius: 10px;
  background: var(--nex-card);
}

.slim-trade-row {
  padding: 7px 10px;
  border-bottom: 1px solid #eef1ec;
  border-left: 2px solid transparent;
  cursor: pointer;
  outline: none;
  background: transparent;
}

.slim-trade-row:last-child {
  border-bottom: none;
}

.slim-trade-row.long {
  border-left-color: var(--nex-green);
  background: rgba(26, 107, 74, 0.03);
}

.slim-trade-row.short {
  border-left-color: var(--nex-red);
  background: rgba(198, 40, 40, 0.03);
}

.slim-trade-row:active {
  opacity: 0.88;
}

.slim-trade-r1 {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 2px;
}

.slim-trade-r1 .slim-leg-pair {
  font-size: 13px;
  font-weight: 700;
}

.slim-trade-r1 .slim-tag {
  font-size: 10px;
  padding: 0 5px;
  line-height: 18px;
}

.slim-trade-pnl {
  margin-left: auto;
  font-size: 14px;
  font-weight: 700;
}

.slim-trade-r2 {
  font-size: 10px;
  color: var(--nex-muted);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slim-leg-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px;
}

.slim-leg-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.slim-leg-pair {
  font-size: 15px;
  font-weight: 700;
}

.slim-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  background: #e8ede6;
  color: var(--nex-muted);
}

.slim-tag.side.long {
  background: rgba(26, 107, 74, 0.12);
  color: var(--nex-primary);
}

.slim-tag.side.short {
  background: rgba(214, 69, 69, 0.1);
  color: var(--nex-red);
}

.slim-tag.plat {
  background: rgba(15, 23, 42, 0.08);
  color: #334155;
  font-weight: 600;
}

.slim-tag.lev {
  background: #eef1f4;
  color: #4a5560;
  font-variant-numeric: tabular-nums;
}

.slim-tag.loop {
  background: #eef1f4;
  color: #4a5560;
  font-variant-numeric: tabular-nums;
}

.slim-tag.run {
  background: rgba(26, 107, 74, 0.12);
  color: var(--nex-primary);
}

.slim-tag.bad {
  background: rgba(214, 69, 69, 0.1);
  color: var(--nex-red);
}

.slim-leg-status {
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  padding: 3px 8px;
  border-radius: 999px;
}

.slim-leg-status.run {
  background: rgba(200, 245, 66, 0.35);
  color: #1a4a32;
}

.slim-leg-status.pause {
  background: #eef1ec;
  color: var(--nex-muted);
}

.slim-leg-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

.slim-leg-metrics.wide {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.slim-leg-metrics > div {
  min-width: 0;
}

.slim-leg-metrics span {
  display: block;
  font-size: 11px;
  color: var(--nex-muted);
  margin-bottom: 2px;
}

.slim-leg-metrics b {
  font-size: 14px;
  font-weight: 700;
}

.slim-leg-line {
  font-size: 12px;
  color: var(--nex-muted);
  line-height: 1.45;
  margin-bottom: 8px;
}

.slim-leg-section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--nex-muted);
  margin-bottom: 6px;
}

.slim-leg-closes {
  border-top: 1px solid var(--nex-line);
  padding-top: 6px;
}

.slim-leg-closes.empty {
  font-size: 12px;
  color: var(--nex-muted);
  border-top: none;
  padding-top: 0;
}

.slim-close-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 6px;
  align-items: center;
  font-size: 11px;
  padding: 4px 0;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.06);
}

.slim-close-row:last-child {
  border-bottom: none;
}

.slim-close-time {
  color: var(--nex-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slim-close-reason {
  font-weight: 600;
}

.slim-close-px {
  color: var(--nex-muted);
  font-family: ui-monospace, monospace;
  font-size: 10px;
}

.slim-leg-foot {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--nex-primary);
  text-align: right;
}

.slim-log-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.slim-log-row {
  background: var(--nex-card);
  border: 1px solid var(--nex-line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
}

.slim-log-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-weight: 700;
  margin-bottom: 4px;
}

.slim-log-note {
  color: var(--nex-text);
  line-height: 1.45;
}

.pnl-pos { color: var(--nex-green); }
.pnl-neg { color: var(--nex-red); }

.slim-trades-stats {
  margin-bottom: 12px;
}

.slim-trades-stats .nex-sum-item b.up { color: var(--nex-green); }
.slim-trades-stats .nex-sum-item b.down { color: var(--nex-red); }

.slim-order-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.slim-order-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 6px;
  align-items: center;
  background: var(--nex-card);
  border: 1px solid var(--nex-line);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 11px;
}

.slim-order-row.compact.close {
  grid-template-columns: auto 1fr auto;
  align-items: start;
}

.slim-order-pair {
  display: block;
  font-size: 11px;
  line-height: 1.4;
  color: var(--nex-text);
}

.slim-order-sub {
  display: block;
  font-size: 10px;
  color: var(--nex-muted);
  margin-top: 2px;
}

.slim-order-row.compact .slim-order-main {
  min-width: 0;
}

.slim-order-row.open {
  border-left: 2px solid var(--nex-green);
}

.slim-order-row.close {
  border-left: 2px solid var(--nex-primary);
}

.slim-order-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 0 4px;
  border-radius: 4px;
  white-space: nowrap;
  min-width: 18px;
  text-align: center;
}

.slim-order-row.open .slim-order-tag {
  background: rgba(26, 107, 74, 0.12);
  color: var(--nex-primary);
}

.slim-order-row.close .slim-order-tag {
  background: rgba(26, 107, 74, 0.08);
  color: #566057;
}

.slim-order-main {
  min-width: 0;
  line-height: 1.4;
}

.slim-order-meta {
  color: var(--nex-muted);
  font-size: 11px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-self: end;
}

.slim-order-ret {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}

.slim-order-hold {
  color: var(--nex-muted);
  font-size: 11px;
}

@media (max-width: 360px) {
  .slim-order-row.close {
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "tag main meta"
      "tag pnl pnl";
  }
  .slim-order-row.close .slim-order-tag { grid-area: tag; }
  .slim-order-row.close .slim-order-main { grid-area: main; }
  .slim-order-row.close .slim-order-meta { grid-area: meta; }
  .slim-order-row.close .pnl-pos,
  .slim-order-row.close .pnl-neg { grid-area: pnl; justify-self: end; }
}

.nex-login-card .req {
  font-style: normal;
  font-size: 11px;
  color: #d64545;
  font-weight: 600;
}

.slim-invite-chip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(200, 245, 66, 0.12);
  border: 1px solid rgba(200, 245, 66, 0.35);
}

.slim-invite-chip .lbl {
  font-size: 11px;
  color: var(--nex-muted);
}

.slim-invite-chip code {
  font-family: ui-monospace, monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #1a6b4a;
}

.slim-copy-btn {
  margin-left: auto;
  border: none;
  background: #c8f542;
  color: #14201a;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
}

.slim-invite-panel {
  margin-bottom: 12px;
}

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

.slim-invite-hero {
  text-align: center;
  margin: 14px 0 16px;
  padding: 16px 12px;
  border-radius: 14px;
  background: linear-gradient(180deg, #f6faf3 0%, #eef5ea 100%);
  border: 1px solid rgba(26, 107, 74, 0.12);
}

.slim-invite-label {
  display: block;
  font-size: 12px;
  color: var(--nex-muted);
  margin-bottom: 8px;
}

.slim-invite-code-big {
  display: block;
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #1a6b4a;
  margin: 0 0 14px;
  word-break: break-all;
}

.slim-invite-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.slim-invite-btn {
  border: none;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

.slim-invite-btn.primary {
  background: #c8f542;
  color: #14201a;
  box-shadow: 0 2px 8px rgba(20, 32, 26, 0.12);
}

.slim-invite-btn.ghost {
  background: #fff;
  color: #1a6b4a;
  border: 1px solid rgba(26, 107, 74, 0.25);
}

.slim-invite-link {
  font-size: 11px;
  line-height: 1.45;
  color: var(--nex-muted);
  word-break: break-all;
  margin: 0;
  padding: 0 4px;
}

.slim-invite-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 4px;
}

.slim-invite-stat {
  text-align: center;
  padding: 10px 4px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--nex-line);
}

.slim-invite-stat b {
  display: block;
  font-size: 18px;
  color: #1a6b4a;
  line-height: 1.2;
}

.slim-invite-stat span {
  display: block;
  font-size: 11px;
  color: var(--nex-muted);
  margin-top: 2px;
}

.slim-invite-stat.total b {
  color: #14201a;
}

.slim-invite-team-panel {
  padding-top: 6px;
}

.slim-invite-gen-block {
  padding: 12px 0;
  border-bottom: 1px solid #eef2eb;
}

.slim-invite-gen-block:last-child {
  border-bottom: none;
  padding-bottom: 4px;
}

.slim-invite-gen-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.slim-invite-gen-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #14201a;
}

.slim-invite-badge {
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(200, 245, 66, 0.35);
  color: #1a6b4a;
  font-size: 12px;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
}

.slim-invite-list {
  background: #f8faf7;
  border: 1px solid #eef2eb;
  border-radius: 10px;
  overflow: hidden;
}

.slim-invite-empty {
  margin: 0;
  padding: 12px 14px;
  text-align: center;
  font-size: 13px;
  color: #9aa89f;
}

.slim-invite-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid #eef2eb;
  font-size: 13px;
  background: #fff;
}

.slim-invite-row:last-child {
  border-bottom: none;
}

.slim-invite-row .u {
  font-weight: 600;
  color: #14201a;
}

.slim-invite-row .t {
  font-size: 11px;
  color: var(--nex-muted);
}

.slim-invite-msg {
  margin: 0 2px 16px;
  text-align: center;
}

.slim-invite-reward-panel {
  margin-bottom: 12px;
}

.slim-reward-head h3 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  color: #14201a;
}

.slim-reward-balance {
  margin: 14px 0 12px;
  padding: 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(200, 245, 66, 0.22), rgba(26, 107, 74, 0.08));
  border: 1px solid rgba(26, 107, 74, 0.12);
}

.slim-reward-main {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.slim-reward-main .lbl {
  font-size: 12px;
  color: var(--nex-muted);
  width: 100%;
  margin-bottom: 2px;
}

.slim-reward-main b {
  font-size: 28px;
  font-weight: 800;
  color: #1a6b4a;
  line-height: 1.1;
}

.slim-reward-main .unit {
  font-size: 13px;
  color: #1a6b4a;
  font-weight: 600;
}

.slim-reward-sub {
  display: flex;
  gap: 16px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--nex-muted);
}

.slim-reward-sub b {
  color: #33443a;
  font-weight: 700;
}

.slim-reward-rules {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8faf7;
  border: 1px solid #eef2eb;
}

.slim-reward-rule-line {
  margin: 0 0 8px;
  font-size: 13px;
  color: #33443a;
}

.slim-reward-rate-list {
  margin: 0 0 8px;
  padding-left: 18px;
  font-size: 13px;
  color: #33443a;
  line-height: 1.6;
}

.slim-reward-withdraw-note {
  margin: 0 !important;
}

.slim-reward-gen-sum {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--nex-muted);
}

.slim-reward-gen-sum b {
  color: #1a6b4a;
  font-weight: 700;
}

.slim-reward-rec-head {
  font-size: 13px;
  font-weight: 700;
  color: #14201a;
  margin-bottom: 8px;
}

.slim-reward-list {
  background: #f8faf7;
  border: 1px solid #eef2eb;
  border-radius: 10px;
  overflow: hidden;
}

.slim-reward-row {
  padding: 10px 12px;
  border-bottom: 1px solid #eef2eb;
  background: #fff;
}

.slim-reward-row:last-child {
  border-bottom: none;
}

.slim-reward-row-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.slim-reward-row .amt {
  font-size: 15px;
  font-weight: 700;
  color: #1a6b4a;
}

.slim-reward-row .meta {
  font-size: 12px;
  color: #33443a;
}

.slim-reward-row .t {
  font-size: 11px;
  color: var(--nex-muted);
}

.slim-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(10, 18, 14, 0.55);
  backdrop-filter: blur(4px);
}

.slim-modal-overlay.hidden {
  display: none;
}

.slim-modal {
  width: min(100%, 340px);
  padding: 22px 20px 18px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
}

.slim-modal h3 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 700;
  color: #14201a;
  text-align: center;
}

.slim-modal p {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.5;
  color: #33443a;
  text-align: center;
}

.slim-modal-note {
  margin-bottom: 16px !important;
  font-size: 12px !important;
}

.slim-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.slim-modal-actions .nex-btn-primary,
.slim-modal-actions .nex-btn-outline {
  width: 100%;
  text-align: center;
  text-decoration: none;
}

.slim-download-item {
  text-decoration: none;
  color: inherit;
}

/* ===== 我的页 · 重构 ===== */
.page.nex-mine.active {
  background: #eef1ec;
}

.nex-mine {
  background: none !important;
  padding-bottom: calc(var(--nex-tab-h) + 16px);
}

.slim-mine-hero {
  background: linear-gradient(165deg, #14201a 0%, #1a6b4a 55%, #2d8a62 100%);
  padding-top: calc(8px + var(--nex-app-top-h, 96px));
  padding-bottom: 28px;
}

.slim-mine-user-compact {
  align-items: flex-start !important;
  padding: 12px 16px 0 !important;
}

.slim-mine-user-compact .nex-avatar {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  flex-shrink: 0;
}

.slim-mine-profile {
  flex: 1;
  min-width: 0;
}

.slim-mine-profile .name {
  font-size: 20px !important;
  letter-spacing: 0.02em;
}

.slim-mine-profile .sub {
  opacity: 0.88 !important;
  margin-top: 2px !important;
}

.slim-mine-profile .slim-mine-meta {
  color: rgba(247, 248, 245, 0.92);
  font-size: 12px;
  margin-top: 6px;
}

.slim-mine-profile .slim-mine-meta.muted {
  color: rgba(247, 248, 245, 0.55) !important;
  font-size: 10px;
}

.slim-mine-body {
  margin-top: -18px;
  padding: 0 14px 20px;
}

.slim-mine-wallet {
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(20, 32, 26, 0.08);
  border: 1px solid rgba(26, 107, 74, 0.1);
  margin-bottom: 12px;
}

.slim-wallet-head {
  padding: 18px 18px 14px;
  background: linear-gradient(135deg, #f8fbf6 0%, #f0f7ed 100%);
}

.slim-wallet-label {
  display: block;
  font-size: 12px;
  color: #6b7a71;
  margin-bottom: 6px;
}

.slim-wallet-balance {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.slim-wallet-balance b {
  font-size: 34px;
  font-weight: 800;
  color: #1a6b4a;
  line-height: 1;
  letter-spacing: -0.02em;
}

.slim-wallet-balance .unit {
  font-size: 14px;
  font-weight: 600;
  color: #3d8a66;
}

.slim-wallet-tags {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.slim-wallet-tags .tag {
  font-size: 11px;
  color: #5a6b60;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(26, 107, 74, 0.12);
}

.slim-wallet-tags .tag em {
  font-style: normal;
  font-weight: 700;
  color: #1a6b4a;
  margin-left: 2px;
}

.slim-wallet-tags .tag.gift em {
  color: #7a8f00;
}

.slim-wallet-foot {
  padding: 12px 16px 14px;
  border-top: 1px solid #eef2eb;
}

.slim-wallet-invite {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8faf7;
}

.slim-wallet-invite .lbl {
  font-size: 12px;
  color: #6b7a71;
  flex-shrink: 0;
}

.slim-wallet-invite code {
  flex: 1;
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #14201a;
}

.slim-wallet-invite .slim-copy-btn {
  margin-left: 0;
  padding: 5px 12px;
  font-size: 12px;
  background: #14201a;
  color: #c8f542;
}

.slim-wallet-hint {
  margin: 10px 2px 0;
  font-size: 11px;
  color: #9aa89f;
  line-height: 1.4;
}

.slim-mine-section {
  margin-bottom: 12px;
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--nex-line);
  overflow: hidden;
}

.slim-section-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border: none;
  background: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #14201a;
  cursor: pointer;
}

.slim-section-toggle .chev {
  color: #b0b8b1;
  font-size: 12px;
  transition: transform 0.2s ease;
}

.slim-section-toggle.open .chev {
  transform: rotate(180deg);
}

.slim-section-body {
  border-top: 1px solid #eef2eb;
}

.slim-section-body.hidden {
  display: none;
}

.slim-records-list {
  max-height: 220px;
  overflow-y: auto;
}

.slim-records-empty {
  margin: 0;
  padding: 16px;
  text-align: center;
  font-size: 12px;
  color: #9aa89f;
}

.slim-record-row {
  padding: 11px 16px;
  border-bottom: 1px solid #f0f3ef;
}

.slim-record-row:last-child {
  border-bottom: none;
}

.slim-record-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 3px;
}

.slim-record-amt {
  font-size: 15px;
  font-weight: 700;
}

.slim-record-amt.pos {
  color: #1a6b4a;
}

.slim-record-amt.neg {
  color: #c0392b;
}

.slim-record-type {
  font-size: 12px;
  color: #6b7a71;
  padding: 2px 8px;
  border-radius: 6px;
  background: #f4f6f3;
}

.slim-record-meta {
  font-size: 11px;
  color: #9aa89f;
}

.slim-mine-menu.nex-mine-card {
  margin: 0 0 12px;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(20, 32, 26, 0.04);
}

.slim-mine-menu .nex-menu-item {
  font-size: 14px;
  padding: 13px 16px;
}

.slim-mine-menu .nex-menu-item .menu-lbl {
  flex: 1;
  text-align: left;
}

.slim-mine-menu .nex-menu-item .menu-extra {
  font-size: 12px;
  color: #9aa89f;
  margin-right: 6px;
}

.slim-mine-body .nex-mine-actions {
  padding: 0;
  margin-bottom: 10px;
}

.slim-mine-body .nex-btn-outline {
  width: 100%;
  height: 44px;
  font-size: 14px;
  border-radius: 12px;
}

.slim-mine-footnote {
  text-align: center;
  font-size: 11px;
  margin: 0;
  padding: 0 8px 8px;
  color: #9aa89f !important;
}

.slim-points-page .nex-panel {
  padding: 16px;
}

.slim-points-head {
  margin-bottom: 12px;
}

.slim-points-balance {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.slim-points-balance .lbl {
  font-size: 12px;
  color: #6b7a71;
  width: 100%;
}

.slim-points-balance b {
  font-size: 20px;
  color: #1a2e22;
  line-height: 1.15;
  font-weight: 700;
}

.slim-points-balance .unit {
  font-size: 12px;
  color: #9aa89f;
}

.slim-points-head .slim-wallet-tags {
  margin-bottom: 6px;
}

.slim-points-tabs {
  margin: 4px 0 10px;
}

.slim-points-promo {
  margin: 10px 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f6faf4;
  border: 1px solid #e3ebe0;
}

.slim-points-promo-title {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 600;
  color: #1a2e22;
}

.slim-points-promo-tiers {
  margin: 0 0 6px;
  padding: 0 0 0 18px;
  font-size: 12px;
  color: #33443a;
  line-height: 1.55;
}

.slim-points-promo-tiers b {
  color: #1a7a4a;
}

.slim-points-promo-note {
  margin: 0 0 4px !important;
  color: #6b7a71 !important;
}

.slim-points-promo-warn {
  margin: 0 !important;
  color: #9aa89f !important;
}

.slim-holiday-claim-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.slim-holiday-claim-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.slim-holiday-claim-info b {
  font-size: 13px;
  color: #1a7a4a;
}

.slim-holiday-claim-hint {
  color: #6b7a71 !important;
  line-height: 1.4;
}

.slim-holiday-claim-hint.claimed {
  color: #9aa89f !important;
}

.slim-holiday-claim-btn {
  display: block;
  flex: 0 0 auto;
  width: auto;
  height: auto;
  margin-top: 0;
  min-width: 96px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  white-space: nowrap;
}

.slim-holiday-claim-btn:disabled {
  background: #c8d2cb;
  color: #f4f7f5;
  cursor: not-allowed;
  filter: none;
  transform: none;
}

.slim-holiday-claim-btn.claimed {
  background: #9aa89f;
  border-color: #9aa89f;
  cursor: default;
}

.slim-notice-holiday .slim-notice-row-sub {
  color: #1a7a4a;
}

.slim-settings-page .nex-panel {
  padding: 16px;
}

.slim-settings-panel label,
.slim-settings-field {
  display: block;
  margin-bottom: 14px;
  font-size: 13px;
  color: #33443a;
}

.slim-settings-panel label > span,
.slim-settings-label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  color: #6b7a71;
}

.slim-settings-panel input[type="text"],
.slim-settings-value {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e3ebe0;
  font: inherit;
  font-size: 14px;
}

.slim-settings-readonly .slim-settings-value {
  background: #f4f6f3;
  color: #6b7a71;
  border-color: #e8ece6;
  user-select: text;
}

.slim-settings-editable input[type="text"] {
  background: #fff;
  color: #1a2e22;
  border-color: #c8dcc8;
}

.slim-settings-editable input[type="text"]:focus {
  outline: none;
  border-color: var(--nex-green, #1a6b4a);
  box-shadow: 0 0 0 2px rgba(26, 107, 74, 0.12);
}

.slim-settings-save {
  width: 100%;
  margin-top: 4px;
}

.slim-agent-page .nex-panel {
  padding: 16px;
}

.slim-agent-panel label {
  display: block;
  margin-bottom: 14px;
  font-size: 13px;
  color: #33443a;
}

.slim-agent-panel label > span {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  color: #6b7a71;
}

.slim-agent-panel input[type="text"],
.slim-agent-panel input[type="number"] {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e3ebe0;
  font: inherit;
  font-size: 14px;
  background: #fff;
}

.slim-agent-balance {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, #eef8f0, #f8fbf8);
  border: 1px solid #dceee0;
}

.slim-agent-balance span {
  font-size: 12px;
  color: #6b7a71;
}

.slim-agent-balance b {
  font-size: 1.4rem;
  color: var(--nex-green, #1a6b4a);
}

.slim-agent-divider {
  text-align: center;
  color: #9aa89f;
  font-size: 12px;
  margin: 14px 0;
}

.slim-agent-panel .nex-btn-primary,
.slim-agent-panel .nex-btn-outline {
  width: 100%;
}

.slim-agent-panel .nex-btn-outline {
  margin-top: 8px;
}

.slim-invite-row .uid {
  font-style: normal;
  font-size: 11px;
  color: #9aa89f;
  font-weight: 500;
}

.slim-reward-row .amt.neg {
  color: #c0392b;
}

/* ===== 我的收益 ===== */
.slim-earn-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 24px;
}
.slim-earn-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(145deg, #e8f1ff 0%, #f3f7fb 55%, #eef6f1 100%);
  border: 1px solid var(--nex-line);
}
.slim-earn-sum-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.slim-earn-sum-item span {
  font-size: 11px;
  color: var(--nex-muted);
}
.slim-earn-sum-item b {
  font-size: 18px;
  font-weight: 700;
}
.slim-earn-sum-item b.up { color: var(--nex-green); }
.slim-earn-sum-item b.down { color: var(--nex-red); }
.slim-earn-bill-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 3px;
  border-radius: 999px;
  background: #e3e8e1;
}
.slim-earn-bill-toggle span {
  text-align: center;
  padding: 9px 8px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--nex-muted);
}
.slim-earn-bill-toggle span.active {
  background: var(--nex-ink);
  color: var(--nex-primary2);
}
.slim-earn-bill-toggle span.disabled {
  opacity: 0.55;
}
.slim-earn-subtabs {
  display: flex;
  gap: 0;
  overflow-x: auto;
  border-bottom: 1px solid var(--nex-line);
  margin: 0 -2px;
  -webkit-overflow-scrolling: touch;
}
.slim-earn-subtabs button {
  flex: 0 0 auto;
  border: none;
  background: transparent;
  padding: 10px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--nex-muted);
  position: relative;
  white-space: nowrap;
}
.slim-earn-subtabs button.active {
  color: var(--nex-blue, #2f6fed);
}
.slim-earn-subtabs button.active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--nex-blue, #2f6fed);
}
.slim-earn-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--nex-card);
  border: 1px solid var(--nex-line);
  border-radius: 12px;
  overflow: hidden;
}
.slim-earn-card {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--nex-line);
  border-radius: 0;
  padding: 12px 14px;
}
.slim-earn-card:last-child { border-bottom: none; }
.slim-earn-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.slim-earn-time {
  font-size: 11px;
  color: var(--nex-muted);
  white-space: nowrap;
}
.slim-earn-card-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.slim-earn-card-metrics > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.slim-earn-card-metrics b {
  font-size: 18px;
  font-weight: 700;
}
.slim-earn-card-metrics span {
  font-size: 11px;
  color: var(--nex-muted);
}
.slim-earn-day-row,
.slim-earn-plain-row {
  display: grid;
  align-items: center;
  gap: 10px;
  padding: 14px 14px;
  border-bottom: 1px solid var(--nex-line);
  background: transparent;
}
.slim-earn-day-row:last-child,
.slim-earn-plain-row:last-child {
  border-bottom: none;
}
.slim-earn-day-row {
  grid-template-columns: auto 1fr auto;
}
.slim-earn-plain-row {
  grid-template-columns: 1fr auto;
}
.slim-earn-day-label,
.slim-earn-pair {
  font-size: 14px;
  font-weight: 600;
  color: var(--nex-text);
}
.slim-earn-day-row b,
.slim-earn-plain-row b {
  font-size: 16px;
  font-weight: 700;
  text-align: center;
}
.slim-earn-plain-row b {
  text-align: right;
}
.slim-earn-day-date {
  font-size: 13px;
  font-weight: 500;
  color: var(--nex-muted);
  white-space: nowrap;
}
.slim-earn-empty {
  margin: 0;
  padding: 48px 16px;
  text-align: center;
  color: var(--nex-muted);
  font-size: 13px;
}
