:root {
  --bg: #101214;
  --panel: #171a1d;
  --panel-border: #2a2f34;
  --text: #f2f1ec;
  --muted: #9aa0a6;
  --accent: #29d3a0;
  --accent-2: #f4c542;
  --danger: #ee5c5c;
  --shadow: 0 16px 44px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "IBM Plex Sans", "PingFang SC", "Helvetica Neue", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #111315 0%, #191713 100%);
}

[hidden] {
  display: none !important;
}

.shell {
  width: min(1240px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.auth-shell {
  width: min(1080px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 56px 0;
}

.auth-layout {
  display: grid;
  grid-template-columns: 1.1fr minmax(340px, 420px);
  gap: 24px;
  align-items: stretch;
}

.auth-hero {
  position: relative;
  overflow: hidden;
  padding: 36px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(41, 211, 160, 0.18), transparent 28%),
    radial-gradient(circle at bottom left, rgba(244, 197, 66, 0.16), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  box-shadow: var(--shadow);
}

.auth-card {
  min-height: 100%;
}

.auth-login-card {
  padding: 28px;
  border-radius: 18px;
}

.auth-copy {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.6;
}

.auth-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.auth-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 13px;
}

.auth-links {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.auth-hint {
  color: var(--muted);
  font-size: 13px;
}

.text-trigger {
  padding: 0;
  background: transparent;
  color: var(--accent);
  font-size: 13px;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.text-trigger:hover {
  color: var(--text);
  transform: none;
}

.auth-status {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  line-height: 1.6;
}

.auth-status.is-pending {
  color: var(--accent-2);
  border-color: rgba(244, 197, 66, 0.45);
  background: rgba(244, 197, 66, 0.08);
}

.auth-status.is-success {
  color: var(--accent);
  border-color: rgba(41, 211, 160, 0.45);
  background: rgba(41, 211, 160, 0.08);
}

.auth-status.is-danger {
  color: var(--danger);
  border-color: rgba(238, 92, 92, 0.45);
  background: rgba(238, 92, 92, 0.08);
}

.api-bound-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(41, 211, 160, 0.24);
  border-radius: 12px;
  background: rgba(41, 211, 160, 0.08);
}

.api-bound-card strong {
  font-size: 18px;
}

.api-bound-card .connection-copy {
  margin: 0;
}

.exchange-bindings {
  display: grid;
  gap: 10px;
  margin: 14px 0 16px;
}

.exchange-binding {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.exchange-binding.is-current {
  border-color: rgba(41, 211, 160, 0.35);
  background: rgba(41, 211, 160, 0.08);
}

.exchange-binding strong,
.exchange-binding small {
  display: block;
}

.exchange-binding small {
  margin-top: 6px;
  color: var(--muted);
}

.register-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.64);
}

.register-modal[hidden] {
  display: none;
}

.register-card {
  width: min(420px, 100%);
  padding: 24px;
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  background:
    radial-gradient(circle at top right, rgba(41, 211, 160, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)),
    var(--panel);
  box-shadow: var(--shadow);
}

.hero,
.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  padding: 30px;
  margin-bottom: 22px;
}

.dashboard-hero {
  align-items: stretch;
}

.hero-main {
  flex: 1;
  min-width: 0;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.plan-fold {
  margin-top: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.plan-fold > summary {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 20px 22px;
  cursor: pointer;
  list-style: none;
  background: rgba(255, 255, 255, 0.03);
}

.plan-fold > summary::-webkit-details-marker {
  display: none;
}

.plan-fold > summary span {
  color: var(--text);
  font-size: 22px;
  font-weight: 700;
}

.plan-fold > summary small {
  color: var(--muted);
  line-height: 1.6;
}

.plan-fold > summary::after {
  content: "展开";
  position: absolute;
  right: 24px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.plan-fold[open] > summary::after {
  content: "收起";
}

.plan-fold .plan-grid {
  margin-top: 0;
  padding: 20px;
}

.monthly-grid {
  margin-top: 0;
}

.plan-card {
  display: flex;
  flex-direction: column;
  padding: 20px;
  border-radius: 18px;
  background: #f8faf8;
  color: #1d2420;
  border: 1px solid rgba(17, 24, 39, 0.08);
  box-shadow: 0 14px 34px rgba(3, 10, 18, 0.12);
  min-height: 388px;
}

.plan-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.plan-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: #e8f8ea;
  color: #159447;
  font-size: 14px;
  font-weight: 700;
}

.plan-term {
  color: #4f8c66;
  font-size: 14px;
  font-weight: 700;
}

.plan-card h3 {
  margin: 16px 0 0;
  font-size: 20px;
  line-height: 1.3;
}

.plan-price {
  margin-top: 18px;
  color: #16a34a;
  font-size: 42px;
  font-weight: 800;
  line-height: 1;
}

.plan-price span {
  margin-left: 6px;
  color: #4b5563;
  font-size: 18px;
  font-weight: 500;
}

.plan-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
  margin-top: 24px;
  min-height: 128px;
}

.plan-metrics div:last-child {
  grid-column: 1 / -1;
}

.plan-metrics span {
  display: block;
  color: #94a3b8;
  font-size: 14px;
}

.plan-metrics strong {
  display: block;
  margin-top: 8px;
  color: #111827;
  font-size: 22px;
}

.plan-action {
  width: 100%;
  min-height: 52px;
  margin-top: auto;
  border-radius: 14px;
  background: linear-gradient(180deg, #16c451 0%, #0fa845 100%);
  color: #f8fff9;
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 12px 22px rgba(22, 196, 81, 0.22);
}

.plan-note {
  display: grid;
  gap: 6px;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
}

.plan-note strong {
  color: var(--text);
}

.hero-side {
  display: grid;
  grid-template-columns: minmax(240px, 320px);
  justify-items: stretch;
  align-content: start;
  gap: 16px;
}

.account-card {
  min-width: 0;
  padding: 18px 20px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.account-card span,
.account-card small {
  color: var(--muted);
}

.account-card strong,
.account-card small {
  display: block;
  margin-top: 6px;
}

.contact-card {
  margin-top: 18px;
  padding: 18px 20px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(41, 211, 160, 0.12), rgba(255, 184, 77, 0.1));
  border: 1px solid rgba(41, 211, 160, 0.2);
}

.contact-card span,
.contact-card small {
  color: var(--muted);
}

.contact-card strong,
.contact-card small {
  display: block;
  margin-top: 6px;
}

.promo-card {
  padding: 18px 20px;
  border-radius: 10px;
  border: 1px solid rgba(244, 197, 66, 0.22);
  background:
    radial-gradient(circle at top right, rgba(244, 197, 66, 0.14), transparent 36%),
    rgba(255, 255, 255, 0.04);
}

.promo-card span,
.promo-card small {
  color: var(--muted);
}

.promo-card strong,
.promo-card small {
  display: block;
  margin-top: 6px;
}

.promo-actions {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.note-preview-card {
  display: grid;
  gap: 14px;
  padding: 20px;
  border-radius: 16px;
  border: 1px solid rgba(41, 211, 160, 0.2);
  background:
    radial-gradient(circle at top right, rgba(41, 211, 160, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03));
}

.note-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.note-preview-head strong,
.note-preview-head small {
  display: block;
  margin-top: 6px;
}

.note-preview-summary {
  color: var(--text);
  line-height: 1.7;
  font-size: 14px;
}

.note-preview-points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.note-preview-points span {
  min-height: 56px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  line-height: 1.5;
  font-size: 13px;
}

.note-preview-actions {
  margin-top: 0;
}

.promo-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 8px;
  background: var(--accent-2);
  color: #1b1200;
  font-weight: 800;
  text-decoration: none;
  transition: transform 180ms ease, opacity 180ms ease;
}

.promo-link-button:hover {
  transform: translateY(-1px);
}

.contact-copy-btn {
  margin-top: 14px;
}

.compact-contact-card {
  margin-top: 0;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 12px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 38px;
  line-height: 1.05;
}

.subtitle {
  margin-top: 12px;
  max-width: 720px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.hero-status {
  min-width: 180px;
  align-self: flex-start;
  text-align: center;
  padding: 16px 20px;
  border-radius: 8px;
  background: rgba(154, 160, 166, 0.12);
  color: var(--muted);
  font-weight: 700;
}

.hero-status.is-hot {
  background: rgba(0, 194, 168, 0.16);
  color: #86ffe6;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
}

.chip.is-online {
  border-color: rgba(41, 211, 160, 0.5);
  color: var(--accent);
}

.grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 20px;
}

.simple-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 20px;
  align-items: start;
}

.top-overview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: start;
  margin-bottom: 22px;
}

.balance-top-panel {
  padding-bottom: 18px;
}

.config-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)),
    var(--panel);
}

.config-copy {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.6;
}

.compact-strip {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.market-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 0;
}

.top-overview .market-strip {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-self: stretch;
}

.fold-stack {
  display: grid;
  gap: 16px;
  margin-top: 4px;
}

.fold-panel {
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: var(--shadow);
}

.fold-panel > summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 18px;
  color: var(--text);
  font-weight: 700;
}

.fold-panel > summary::-webkit-details-marker {
  display: none;
}

.fold-panel > summary::after {
  content: "展开";
  float: right;
  color: var(--muted);
  font-weight: 400;
}

.fold-panel[open] > summary::after {
  content: "收起";
}

.fold-body {
  padding: 0 16px 16px;
}

.flat-panel {
  box-shadow: none;
  border-radius: 10px;
}

.income-tile {
  background: linear-gradient(180deg, rgba(41, 211, 160, 0.12) 0%, rgba(255, 255, 255, 0.04) 100%);
}

.price-tile {
  min-height: 126px;
  padding: 20px;
  background: #171a1d;
  border: 1px solid var(--panel-border);
  border-radius: 14px;
}

.price-tile span,
.pnl-card span,
.pnl-card small {
  color: var(--muted);
}

.price-tile strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
  color: var(--text);
}

.price-tile.total strong {
  color: var(--accent);
}

.lower {
  margin-top: 20px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel {
  padding: 26px;
}

.config-panel form {
  margin-top: 18px;
}

.pnl-panel {
  margin-top: 20px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.signal-number {
  margin-top: 24px;
  font-size: 72px;
  font-weight: 700;
  letter-spacing: 0;
}

.signal-copy {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.6;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 24px;
}

.trade-legs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.compact-legs {
  margin-top: 14px;
}

.risk-strip {
  margin-top: 12px;
}

.risk-card {
  padding: 16px;
  border-radius: 8px;
  border: 1px solid rgba(41, 211, 160, 0.18);
  background: rgba(41, 211, 160, 0.06);
}

.risk-card span,
.risk-card small {
  color: var(--muted);
}

.risk-card strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
  color: var(--text);
}

.risk-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.risk-metric {
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

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

.risk-metric strong {
  margin-top: 6px;
  font-size: 24px;
}

.risk-card small {
  display: block;
  margin-top: 8px;
  line-height: 1.5;
}

.compact-kpis {
  margin-top: 14px;
}

.mini-signal {
  margin-top: 12px;
}

.mini-signal strong {
  display: block;
  font-size: 44px;
  line-height: 1;
}

.action-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.pnl-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}

.pnl-card {
  min-height: 132px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.pnl-card strong {
  display: block;
  margin-top: 10px;
  font-size: 30px;
  color: var(--text);
}

.pnl-card small {
  display: block;
  margin-top: 10px;
  line-height: 1.5;
}

.total-card {
  background: rgba(41, 211, 160, 0.07);
}

.is-profit {
  color: var(--accent) !important;
}

.is-loss {
  color: var(--danger) !important;
}

.kpi,
.trade-legs div {
  padding: 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.kpi span,
.trade-legs span,
label,
.notes {
  color: var(--muted);
}

.kpi strong,
.trade-legs strong {
  display: block;
  margin-top: 8px;
  color: var(--text);
  font-size: 20px;
}

.action-status {
  margin: 16px 0 12px;
  padding: 12px 14px;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  line-height: 1.5;
}

.action-status.is-pending {
  color: var(--accent-2);
  border-color: rgba(244, 197, 66, 0.45);
  background: rgba(244, 197, 66, 0.08);
}

.action-status.is-success {
  color: var(--accent);
  border-color: rgba(41, 211, 160, 0.45);
  background: rgba(41, 211, 160, 0.08);
}

.action-status.is-muted {
  color: #d6d0c3;
}

.action-status.is-danger {
  color: var(--danger);
  border-color: rgba(238, 92, 92, 0.45);
  background: rgba(238, 92, 92, 0.08);
}

.mode-warning {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid rgba(244, 197, 66, 0.45);
  background: rgba(244, 197, 66, 0.08);
  color: #f6d77a;
  line-height: 1.5;
}

.mode-warning.is-danger {
  border-color: rgba(238, 92, 92, 0.45);
  background: rgba(238, 92, 92, 0.08);
  color: var(--danger);
}

.mode-warning.is-live {
  border-color: rgba(41, 211, 160, 0.45);
  background: rgba(41, 211, 160, 0.08);
  color: var(--accent);
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  border-radius: 8px;
  padding: 12px 16px;
  cursor: pointer;
  transition: transform 180ms ease, opacity 180ms ease;
}

button:hover {
  transform: translateY(-1px);
}

.primary {
  margin-top: 18px;
  width: 100%;
  background: var(--accent);
  color: #04111c;
  font-weight: 700;
}

.compact {
  margin-top: 0;
}

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

#save-config-btn {
  margin-top: 4px;
  min-height: 46px;
}

.danger {
  margin-top: 10px;
  width: 100%;
  background: rgba(238, 92, 92, 0.16);
  color: #ff9b9b;
  border: 1px solid rgba(238, 92, 92, 0.28);
  font-weight: 700;
}

.live {
  margin-top: 10px;
  width: 100%;
  background: #f4c542;
  color: #1b1200;
  font-weight: 800;
  box-shadow: 0 10px 26px rgba(244, 197, 66, 0.18);
}

.ghost {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.logbox {
  margin: 16px 0 0;
  min-height: 160px;
  padding: 14px;
  border-radius: 8px;
  overflow: auto;
  background: #050c17;
  color: #9fe7d8;
  font-size: 12px;
}

form {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
  font-size: 14px;
}

input[type="number"],
input[type="password"],
input[type="text"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.connection-copy {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.connection-copy.is-success {
  color: var(--accent);
}

.connection-copy.is-danger {
  color: var(--danger);
}

.connection-copy.is-pending {
  color: var(--accent-2);
}

.content-toolbar {
  width: min(360px, 100%);
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.content-card {
  padding: 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}

.mini-head {
  margin-bottom: 10px;
}

.mini-head h3 {
  margin: 0;
  font-size: 18px;
}

.copy-btn {
  min-width: 92px;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.copy-btn:hover {
  transform: translateY(-1px);
}

.copy-btn.is-success {
  border-color: rgba(41, 211, 160, 0.45);
  background: rgba(41, 211, 160, 0.14);
  color: var(--accent);
}

.copy-btn.is-danger {
  border-color: rgba(255, 107, 107, 0.45);
  background: rgba(255, 107, 107, 0.14);
  color: var(--danger);
}

.copy-btn.is-pending {
  border-color: rgba(255, 184, 77, 0.45);
  background: rgba(255, 184, 77, 0.14);
  color: #ffd089;
}

.temp-copy-buffer {
  position: fixed;
  left: -9999px;
  top: 0;
  opacity: 0;
  pointer-events: none;
}

.content-box {
  width: 100%;
  min-height: 220px;
  resize: vertical;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: #0c1217;
  color: #dce8e2;
  line-height: 1.65;
}

.balance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.balance-card {
  padding: 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.balance-card span,
.balance-card small,
.balance-empty,
.balance-asset small {
  color: var(--muted);
}

.balance-card strong,
.balance-asset strong {
  display: block;
  margin-top: 8px;
  color: var(--text);
}

.balance-assets {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.balance-asset,
.balance-empty {
  padding: 14px 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.balance-empty {
  line-height: 1.5;
}

.positions-panel {
  margin-bottom: 20px;
}

.positions-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.position-card,
.position-empty {
  padding: 14px 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.position-card {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.position-card strong,
.position-card small {
  display: block;
}

.position-card small,
.position-empty {
  color: var(--muted);
  line-height: 1.5;
}

.position-card .is-profit {
  color: var(--accent) !important;
}

.position-card .is-loss {
  color: var(--danger) !important;
}

.wide-note {
  grid-column: 1 / -1;
}

.switch {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
}

.notes {
  padding-left: 18px;
  line-height: 1.8;
}

.advanced {
  margin-top: 0;
}

.advanced summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 18px;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-weight: 700;
}

.advanced summary::-webkit-details-marker {
  display: none;
}

.advanced summary::after {
  content: "展开";
  float: right;
  color: var(--muted);
  font-weight: 400;
}

.advanced[open] summary::after {
  content: "收起";
}

.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.64);
}

.confirm-modal[hidden] {
  display: none;
}

.confirm-card {
  width: min(520px, 100%);
  padding: 26px;
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  background: #171a1d;
  box-shadow: var(--shadow);
}

.confirm-summary {
  margin-top: 14px;
  color: var(--text);
  line-height: 1.7;
}

.confirm-risk {
  margin-top: 16px;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid rgba(244, 197, 66, 0.45);
  background: rgba(244, 197, 66, 0.08);
  color: #f6d77a;
  line-height: 1.6;
}

.confirm-risk.is-live {
  border-color: rgba(238, 92, 92, 0.55);
  background: rgba(238, 92, 92, 0.12);
  color: #ff9b9b;
}

.confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.payment-card {
  max-width: 560px;
}

.payment-qr-wrap {
  display: grid;
  place-items: center;
  margin-top: 18px;
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(32, 88, 198, 0.92), rgba(18, 67, 162, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.payment-qr-frame {
  width: min(420px, 100%);
  padding: 14px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 22px 40px rgba(1, 12, 38, 0.22);
}

.payment-qr-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 20px;
  background: #fff;
}

.payment-meta {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  color: var(--muted);
  line-height: 1.6;
}

.payment-meta strong {
  color: var(--accent);
  font-size: 28px;
}

@media (max-width: 900px) {
  .auth-layout,
  .top-overview,
  .hero,
  .grid,
  .simple-grid {
    grid-template-columns: 1fr;
    display: grid;
  }

  .action-row,
  .compact-strip {
    grid-template-columns: 1fr;
  }

  .hero-side {
    justify-items: stretch;
    grid-template-columns: 1fr;
  }

  .kpis,
  .trade-legs,
  .content-grid,
  .market-strip,
  .pnl-grid,
  .plan-grid,
  .position-card,
  .note-preview-points {
    grid-template-columns: 1fr;
  }

  .plan-fold > summary span {
    font-size: 20px;
  }

  .plan-card,
  .price-tile {
    min-height: auto;
  }

  .plan-fold .plan-grid {
    padding: 16px;
  }
}

@media (max-width: 560px) {
  .auth-shell,
  .hero {
    padding: 20px;
  }

  h1 {
    font-size: 30px;
  }

  .signal-number {
    font-size: 52px;
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }
}
