:root {
  --bg: #f4f5f7;
  --panel: #ffffff;
  --line: #e5e7eb;
  --text: #1f2937;
  --muted: #6b7280;
  --primary: #2563eb;
  --primary-h: #1d4ed8;
  --danger: #dc2626;
  --up: #16a34a;
  --down: #dc2626;
  --warn: #d97706;
  --r: 10px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font: 14px/1.6 -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }

/* ============ 通用卡片面板 ============ */
.tech { background: var(--panel); border: 1px solid #eef0f3; border-radius: 12px; box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 4px 14px rgba(16,24,40,.04); }

/* ============ 登录 ============ */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.loading-text { color: var(--muted); font-size: 14px; letter-spacing: 2px; }
.login-card { width: 100%; max-width: 380px; padding: 30px 28px; }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.logo-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); flex: none; }
.login-brand h1 { margin: 0; font-size: 19px; font-weight: 700; }
.login-brand p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.field { display: block; margin-bottom: 14px; }
.field span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.field input { width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--text); font-size: 14px; outline: none; transition: border-color .15s, box-shadow .15s; }
.field input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.error { margin: 12px 0 0; color: var(--down); font-size: 13px; }
.login-switch { margin: 14px 0 0; text-align: center; font-size: 13px; color: var(--muted); }
.login-switch a { color: var(--primary); cursor: pointer; text-decoration: none; }
.login-switch a:hover { text-decoration: underline; }

/* ============ 按钮 ============ */
.btn { border: 0; border-radius: 8px; padding: 10px 16px; font-size: 14px; font-weight: 500; cursor: pointer; transition: background .15s, opacity .15s; color: #fff; white-space: nowrap; }
.btn:hover { filter: brightness(1.04); }
.btn:disabled { opacity: .5; cursor: default; }
.btn-primary { background: var(--primary); }
.btn-primary:hover { background: var(--primary-h); }
.btn-danger { background: var(--danger); }
.btn-ghost { background: #fff; border: 1px solid var(--line); color: var(--text); }
.btn-ghost:hover { background: #f9fafb; }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 13px; font-size: 13px; }
.btn-mini { padding: 5px 12px; font-size: 13px; border-radius: 7px; border: 0; color: #fff; font-weight: 500; cursor: pointer; }
.btn-mini-danger { background: var(--danger); }
.btn-mini-ghost { background: #fff; border: 1px solid var(--line); color: var(--text); }
.btn-mini-ghost:hover { background: #f9fafb; }

/* ============ 顶栏 ============ */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 22px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar-brand { display: flex; align-items: center; gap: 10px; }
.topbar-title { font-size: 16px; font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-status { display: flex; align-items: center; gap: 12px; }
.badge { font-size: 12px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.badge-on { color: var(--up); border-color: rgba(22,163,74,.35); background: rgba(22,163,74,.07); }
.badge-off { color: var(--warn); border-color: rgba(217,119,6,.35); background: rgba(217,119,6,.07); }
.updated { font-size: 12px; color: var(--muted); }

main { max-width: 1480px; margin: 0 auto; padding: 16px 22px 60px; }

/* ============ KPI ============ */
.kpi-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.kpi { padding: 16px 18px; }
.kpi-label { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.kpi-value { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: 12px; color: var(--muted); margin-left: 8px; font-weight: 400; }

/* ============ 两栏布局 ============ */
.layout { display: grid; grid-template-columns: 1fr 320px; gap: 14px; align-items: start; margin-top: 14px; }
.layout-main { min-width: 0; }
.layout-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 60px; }
.side-box { padding: 14px 16px; }
.add-panel { margin-top: 10px; }
.add-panel .field { margin-bottom: 10px; }

.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.panel-title { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; font-weight: 600; color: var(--text); }
.panel-title i { width: 3px; height: 14px; border-radius: 2px; background: var(--primary); }

/* 顶部添加账号面板（折叠） */
.add-panel-box { padding: 16px 18px; margin-bottom: 14px; }
.add-form { display: grid; grid-template-columns: 1fr 1fr 1.5fr 1fr auto; gap: 10px; align-items: end; }
.add-form .field { margin-bottom: 0; }
.msg { margin: 12px 0 0; font-size: 13px; }
.msg.ok { color: var(--up); }
.msg.err { color: var(--down); }

/* ============ 区块标题 ============ */
.sec-title { display: flex; align-items: center; gap: 10px; margin: 22px 0 12px; font-size: 15px; font-weight: 600; }
.sec-title::before { content: ''; width: 4px; height: 15px; border-radius: 2px; background: var(--primary); }
.muted { color: var(--muted); font-weight: 400; font-size: 12px; }

/* ============ 账号卡片 ============ */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.card { padding: 16px 18px; }
.card-off { opacity: .55; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 13px; }
.card-title { font-size: 15px; font-weight: 600; }
.card-acct { font-size: 12px; color: var(--muted); margin-top: 3px; font-variant-numeric: tabular-nums; }
.pill { font-size: 12px; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.pill-on { color: var(--up); background: rgba(22,163,74,.1); }
.pill-stale { color: var(--warn); background: rgba(217,119,6,.1); }
.pill-off { color: var(--muted); background: #f3f4f6; }
.card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.kv-span2 { grid-column: 1 / -1; }
.ml-danger { color: #dc2626 !important; }
.ml-warn { color: #d97706 !important; }
.ml-ok { color: #16a34a !important; }
.note-btn { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 13px; padding: 0 2px; vertical-align: middle; }
.note-btn:hover { color: var(--primary); }
.pause-btn { background: none; border: 0; padding: 0; cursor: pointer; line-height: 0; vertical-align: middle; opacity: .85; transition: opacity .15s, transform .1s; }
.pause-btn:hover { opacity: 1; transform: scale(1.06); }
.pause-btn:active { transform: scale(.96); }
.pause-btn svg { display: block; }

/* 币种标签 */
.cur-tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 4px; margin-left: 6px; vertical-align: middle; letter-spacing: 0; }
.cur-usc { background: #fef3c7; color: #b45309; }
.cur-usd { background: #dbeafe; color: #1d4ed8; }
.cur-other { background: #f3f4f6; color: #6b7280; }

/* 持仓方向标签 */
.dir-tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 4px; margin-right: 6px; }
.dir-buy { background: rgba(22,163,74,.1); color: #16a34a; }
.dir-sell { background: rgba(220,38,38,.1); color: #dc2626; }
.dir-both { background: rgba(217,119,6,.1); color: #d97706; }

/* ============ 专业账户卡片（高级感） ============ */
.acct-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #eef0f3;
  box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 4px 14px rgba(16,24,40,.04);
  transition: box-shadow .2s ease, transform .2s ease;
}
.acct-card:hover { box-shadow: 0 2px 6px rgba(16,24,40,.06), 0 12px 28px rgba(16,24,40,.09); }

.acct-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.acct-name { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }

.acct-tags { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.acct-tag-item { color: var(--muted); }
.acct-online { margin-left: auto; color: var(--up); font-size: 12px; letter-spacing: .5px; }

/* 暂停状态：只淡化内容区，顶部「已暂停」和 恢复图标 保持清晰 */
.acct-paused { background: #fbfbfd; border-color: #f1e4e4; }
.acct-paused .acct-body { opacity: .55; filter: grayscale(.6); }
.acct-paused-badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 4px; background: #fee2e2; color: #dc2626; white-space: nowrap; }
.acct-btn:disabled { opacity: .5; cursor: not-allowed; }

/* 余额：细体大字（高级感核心） */
.acct-balance { font-size: 34px; font-weight: 300; font-variant-numeric: tabular-nums; letter-spacing: -1px; line-height: 1.1; margin-top: 18px; text-align: right; }
/* 品种名 + 余额同一行（左品种 / 右金额） */
.acct-money { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 14px; }
.acct-money .acct-balance { margin-top: 0; flex: 1; min-width: 0; }
.acct-money-sym { font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; flex: none; }
.acct-balance-label { font-size: 11px; color: #9ca3af; text-align: right; margin-top: 3px; letter-spacing: 1.5px; text-transform: uppercase; }

.acct-details { margin-top: 16px; border-top: 1px solid #f0f1f3; }
.acct-row { display: flex; justify-content: space-between; align-items: baseline; padding: 9px 0; font-size: 13px; }
.acct-row:not(:last-child) { border-bottom: 1px solid #f7f8fa; }
.acct-row > span:first-child { color: var(--muted); }
.acct-row > span:last-child { font-variant-numeric: tabular-nums; font-weight: 500; }

/* 风险：进度条可视化 */
.acct-risk { margin-top: 14px; }
.acct-risk-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; margin-bottom: 6px; }
.acct-risk-head > span:first-child { color: var(--muted); }
.acct-risk-head > span:last-child { font-variant-numeric: tabular-nums; font-weight: 600; }
.acct-risk-bar { height: 4px; border-radius: 2px; background: #f0f1f3; overflow: hidden; }
.acct-risk-fill { height: 100%; border-radius: 2px; transition: width .3s ease; }

.acct-btn { margin-top: 16px; padding: 11px; border: 0; border-radius: 10px; background: #fef2f2; color: var(--danger); font-size: 14px; font-weight: 600; cursor: pointer; transition: background .15s; }
.acct-btn:hover { background: #fee2e2; }
.acct-btn:active { background: #fecaca; }

/* ============ 卡片统一结构 ============ */
.card-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.card-head-main { min-width: 0; flex: 1; }
.card-name { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.card-main-num { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; margin: 12px 0 8px; letter-spacing: -.5px; }
.card-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 5px 0; font-size: 13px; }
.card-row .k { color: var(--muted); }
.card-row .v { font-variant-numeric: tabular-nums; font-weight: 500; }

.pos-head-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pos-symbol { font-size: 17px; font-weight: 700; }
.pos-profit { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ============ 备注弹窗 ============ */
.modal-mask { position: fixed; inset: 0; background: rgba(15,23,42,.45); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal { background: #fff; border-radius: 12px; padding: 22px 24px; width: 100%; max-width: 360px; box-shadow: 0 20px 50px rgba(0,0,0,.2); }
.modal h3 { margin: 0 0 14px; font-size: 16px; font-weight: 600; }
.modal input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; outline: none; color: var(--text); }
.modal input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.confirm-text { margin: 0; font-size: 14px; color: #4b5563; line-height: 1.65; }

/* ============ 会员管理弹窗 ============ */
.modal-xl { max-width: 760px; max-height: 90vh; overflow: auto; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.modal-head h3 { margin: 0; font-size: 16px; font-weight: 600; }
.user-box-title { margin: 16px 0 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.user-add-box { background: #f9fafb; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.user-form { display: flex; gap: 8px; }
.user-form input { flex: 1; min-width: 0; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; outline: none; color: var(--text); background: #fff; }
.user-form input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.user-accs-input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; font-family: inherit; resize: vertical; outline: none; color: var(--text); background: #fff; line-height: 1.8; font-variant-numeric: tabular-nums; }
.user-accs-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.user-accs-hint { margin: 6px 0 0; font-size: 12px; }

/* 会员表格 */
.users-table-wrap { border: 1px solid var(--line); border-radius: 10px; overflow: auto; max-height: 240px; background: #fff; }
.users-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.users-table thead th { position: sticky; top: 0; text-align: left; padding: 10px 12px; font-size: 12px; font-weight: 600; color: var(--muted); background: #f9fafb; border-bottom: 1px solid var(--line); white-space: nowrap; }
.users-table tbody td { padding: 10px 12px; border-bottom: 1px solid #f0f1f3; }
.users-table tbody tr:last-child td { border-bottom: 0; }
.users-table tbody tr:hover { background: #f9fafb; }
.ut-name { font-weight: 600; }
.ut-phone { font-variant-numeric: tabular-nums; color: var(--muted); }
.ut-time { font-size: 12px; color: var(--muted); white-space: nowrap; }
.ut-bal { font-variant-numeric: tabular-nums; text-align: right; font-weight: 600; color: #15803d; white-space: nowrap; }
.ut-actions { text-align: right; white-space: nowrap; }
.ut-actions .btn-mini + .btn-mini { margin-left: 6px; }
.kv { display: flex; flex-direction: column; gap: 1px; }
.kv-k { font-size: 12px; color: var(--muted); }
.kv-v { font-size: 15px; font-variant-numeric: tabular-nums; font-weight: 600; }
.card-error { font-size: 13px; color: var(--warn); line-height: 1.55; }
.card-actions { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); display: flex; gap: 8px; }

/* ============ 表格 ============ */
.table-box { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
thead th { text-align: left; padding: 11px 14px; font-size: 12px; font-weight: 600; color: var(--muted); background: #f9fafb; border-bottom: 1px solid var(--line); }
tbody td { padding: 11px 14px; border-bottom: 1px solid #f0f1f3; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f9fafb; }
th.r, td.r { text-align: right; }
.tag { display: inline-block; padding: 1px 9px; border-radius: 5px; font-size: 12px; font-weight: 500; }
.tag-buy { color: var(--up); background: rgba(22,163,74,.1); }
.tag-sell { color: var(--down); background: rgba(220,38,38,.1); }
.pos { color: var(--up); }
.neg { color: var(--down); }
.empty { margin: 0; padding: 28px; text-align: center; color: var(--muted); font-size: 13px; }

#toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: #1f2937; color: #fff; padding: 11px 20px; border-radius: 10px; font-size: 13px; z-index: 99; box-shadow: 0 8px 24px rgba(0,0,0,.18); max-width: 88%; text-align: center; }

/* ============ 响应式 ============ */
@media (max-width: 1199px) {
  .kpi-row { grid-template-columns: repeat(3, 1fr); }
  .layout { grid-template-columns: 1fr; }
  .layout-side { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .layout-side .side-box:last-child { grid-column: 1 / -1; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}

@media (max-width: 767px) {
  body { font-size: 13px; }
  main { padding: 10px 12px 50px; }
  .topbar { padding: 10px 12px; flex-wrap: wrap; gap: 8px; }
  .topbar-title { font-size: 14px; }
  .topbar-right { flex: 1 1 100%; justify-content: space-between; flex-wrap: wrap; }
  #btn-close-all { flex: 1 1 100%; order: -1; padding: 11px 14px; }
  .updated { display: none; }
  /* 手机端状态行：实时 + 指标 + 密码 + 退出 强制一行 */
  .topbar-status { flex: 1 1 100%; display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .topbar-status .badge { flex: none; }
  .topbar-status .gi-top { flex: 1 1 auto; font-size: 11px; gap: 4px; min-width: 0; white-space: nowrap; }
  .topbar-status .btn-sm { flex: none; padding: 7px 10px; font-size: 12px; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .kpi { padding: 12px 14px; }
  .kpi-value { font-size: 20px; }
  .kpi-sub { display: block; margin-left: 0; margin-top: 2px; }
  .layout-side { display: flex; flex-direction: column; }
  .chart { height: 200px; }
  .cards { grid-template-columns: 1fr; gap: 10px; }
  .acct-card { padding: 16px; }
  .acct-balance { font-size: 28px; }
  .add-form { grid-template-columns: 1fr; }
  table { font-size: 12px; }
  thead th { padding: 9px 10px; }
  tbody td { padding: 9px 10px; }
  .login-wrap { padding: 16px; }
  .login-card { padding: 24px 20px; }
  .btn { padding: 11px 14px; }
  .btn-mini { padding: 9px 14px; }
  .card-actions .btn-mini { padding: 10px 14px; }
}

/* ============ 手机端持仓卡片（参考 App 风格） ============ */
.desktop-only { display: block; }
.mobile-only { display: none; }
.pos-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.pos-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 16px 12px; }
.pc-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.pc-dir { font-size: 13px; font-weight: 600; padding: 2px 8px; border-radius: 5px; color: #fff; flex: none; }
.pc-dir-buy { background: var(--up); }
.pc-dir-sell { background: var(--danger); }
.pc-symbol { font-size: 18px; font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-balance { font-size: 25px; font-weight: 700; margin: 2px 0 10px; font-variant-numeric: tabular-nums; }
.pc-profit { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pc-main { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.pc-lots { font-size: 15px; color: var(--muted); }
.pc-price { font-size: 14px; font-variant-numeric: tabular-nums; }
.pc-meta { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.pc-actions { display: flex; gap: 8px; }
.pc-btn { flex: 1; padding: 11px; border: 0; border-radius: 8px; background: #f3f4f6; color: var(--text); font-size: 15px; font-weight: 500; cursor: pointer; }
.pc-btn:active { background: #e5e7eb; }
.pc-btn-danger { background: #fef2f2; color: var(--danger); }
.pc-btn-danger:active { background: #fee2e2; }

@media (max-width: 767px) {
  .desktop-only { display: none !important; }
  .mobile-only { display: block; }
  .pos-cards { grid-template-columns: 1fr; }
}
/* 持仓三项：成本 / 现价 / 止损 —— 三等分，恒为一行 */
.q-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; margin-top: 10px; font-size: 11px; font-variant-numeric: tabular-nums; }
.q-row-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.q-row-1 { grid-template-columns: 1fr; }
.q-row-ref { background: #f1f5f9; border-style: dashed; color: #64748b; }
.q-row-ref em { color: #94a3b8; }
.q-cell { display: flex; align-items: baseline; gap: 3px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-cell em { font-style: normal; color: var(--muted); font-size: 10px; flex: none; }
/* 有止损 → 整行变绿（提示已设保护） */
.q-row.q-row-has-sl { background: #dcfce7; border-color: #86efac; color: #15803d; }
.q-row.q-row-has-sl em { color: #15803d; font-weight: 600; }

/* 持仓品种实时价格 */
.acct-quotes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.acct-quotes span { background: #f8fafc; border: 1px solid var(--line); border-radius: 6px; padding: 3px 9px; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--text); white-space: normal; max-width: 100%; }
.acct-quotes .q-i { white-space: nowrap; display: inline-block; }
.acct-quotes b { font-weight: 600; margin-right: 5px; }
.acct-quotes em { font-style: normal; color: var(--muted); margin: 0 4px 0 8px; font-size: 12px; }
.acct-quotes-ref span { background: #f1f5f9; border-style: dashed; color: #64748b; font-size: 12px; padding: 3px 8px; max-width: 100%; white-space: normal; }
.acct-quotes-ref b { color: #475569; }
.acct-quotes-ref em { margin: 0 3px 0 5px; font-size: 11px; }
.acct-quotes-ref .q-rmb { white-space: nowrap; display: inline-block; }
/* ============ 添加到桌面提示 ============ */
.install-tip { position: fixed; left: 12px; right: 12px; bottom: 12px; display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; box-shadow: 0 10px 34px rgba(16,24,40,.18); z-index: 95; animation: tipIn .3s ease; }
@keyframes tipIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.install-tip-text { flex: 1; display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--muted); }
.install-tip-text strong { font-size: 14px; color: var(--text); }
/* ============ iOS 添加主屏幕引导 ============ */
.ios-steps { display: flex; flex-direction: column; gap: 14px; margin: 6px 0 10px; }
.ios-step { display: flex; gap: 10px; align-items: flex-start; }
.ios-step-num { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.ios-step-body { display: flex; flex-direction: column; gap: 3px; }
.ios-step-body strong { font-size: 14px; }
.ios-step-body > span { color: var(--muted); font-size: 12px; }
.ios-mock-bar { display: flex; gap: 14px; align-items: center; justify-content: center; background: #f3f4f6; border-radius: 8px; padding: 8px 12px; margin-top: 6px; font-size: 15px; color: #9ca3af; }
.ios-mock-bar .ios-share { background: var(--primary); color: #fff; border-radius: 6px; padding: 2px 9px; animation: sharePulse 1.4s ease-in-out infinite; }
@keyframes sharePulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .6; transform: scale(1.06); } }
/* 开多/开空按钮 */
.btn-open-buy { background: #22c55e; }
.btn-open-buy:hover { background: #16a34a; }
.btn-open-sell { background: #dc2626; }
.btn-open-sell:hover { background: #b91c1c; }
/* 会员开仓权限开关 */
.btn-mini-on { background: #16a34a; color: #fff; }
.btn-mini-on:hover { background: #15803d; }
/* 卡片操作行（开多/开空/一键平仓） */
.acct-actions { display: flex; gap: 8px; margin-top: 12px; }
.acct-actions .acct-btn { flex: 1; margin: 0; }
.acct-btn-buy { background: #22c55e; color: #ffffff; }
.acct-btn-buy:hover { background: #16a34a; }
.acct-btn-sell { background: #dc2626; color: #ffffff; }
.acct-btn-sell:hover { background: #b91c1c; }
/* M1 指标行（仅管理员显示） */
.acct-indicators { display: flex; gap: 12px; margin-top: 10px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.acct-indicators b { color: var(--text); font-variant-numeric: tabular-nums; margin-left: 2px; }
.acct-indicators .bias-long { color: #dc2626; }
.acct-indicators .bias-short { color: #16a34a; }
/* 顶部全局指标行（仅管理员） */
.global-indicators-box { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin: 12px 0 4px; font-size: 13px; color: var(--muted); box-shadow: 0 1px 3px rgba(16,24,40,.05); }
.global-indicators-box .gi-symbol { font-size: 15px; color: var(--text); font-weight: 700; margin-right: 4px; }
.global-indicators-box b { color: var(--text); font-variant-numeric: tabular-nums; margin-left: 3px; }
.global-indicators-box .bias-long { color: #dc2626; }
.global-indicators-box .bias-short { color: #16a34a; }
/* 顶栏全局指标（实时后，仅管理员） */
.gi-top { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.gi-top .gi-item b { color: var(--text); font-variant-numeric: tabular-nums; margin-left: 2px; }
.gi-top .gi-sep { color: var(--line); }
.gi-top.bias-long, .gi-top.bias-long b, .gi-top.bias-long .gi-item { color: #dc2626; }
.gi-top.bias-short, .gi-top.bias-short b, .gi-top.bias-short .gi-item { color: #16a34a; }
.gi-top.bias-mid, .gi-top.bias-mid b, .gi-top.bias-mid .gi-item { color: #ca8a04; }