/* 设计令牌：slate 中性底 + 品牌红主色（与方案中的现代阴影/圆角对齐，未改业务逻辑） */
@font-face {
  font-family: "ACUI";
  src: local("Microsoft YaHei"), local("微软雅黑");
  /* CJK Unified Ideographs + 常用中文标点/全角 */
  unicode-range: U+2E80-2EFF, U+3000-303F, U+31C0-31EF, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FE30-FE4F, U+FF00-FFEF;
}

@font-face {
  font-family: "ACUI";
  src: local("Arial");
  /* 基本拉丁/数字/常用符号（让英文与数字优先走 Arial） */
  unicode-range: U+0000-02AF, U+2000-206F, U+20A0-20CF, U+2100-214F, U+2190-21FF, U+2200-22FF, U+2300-23FF, U+2500-257F, U+25A0-25FF;
}

:root {
  --primary: #c62828;
  --primary-dim: #e53935;
  --accent: #4a6fa5;
  --accent-dim: #5b7fbb;
  /* 全局背景（网页端） */
  --bg: #ffffff;
  --card: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --profit-up: #c62828;
  --profit-down: #15803d;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.06);
  --radius-card: 12px;
  --radius-btn: 10px;
}

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

@media (prefers-reduced-motion: reduce) {
  .card,
  .table-wrap,
  .kv-strip {
    animation: none !important;
  }
  .btn.primary:hover {
    transform: none !important;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "ACUI", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
  font-size: 15px;
}

main#app {
  width: 72vw;
  min-width: 980px;
  max-width: 1600px;
  margin: 0 auto;
  padding: 12px 16px 48px;
}

main#app.page-list-full {
  width: 92vw;
  min-width: 980px;
  max-width: none;
  min-height: 100vh;
  padding: 12px 12px 48px;
  box-sizing: border-box;
}

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

.btn-ico {
  font-weight: 800;
  margin-right: 6px;
}

.settle-hint {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  margin: 10px 0 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
}

.settle-day {
  font-weight: 700;
  color: #111;
  letter-spacing: 0.2px;
}

.settle-note {
  color: var(--muted);
  font-size: 13px;
}

.table-wrap {
  width: 100%;
  overflow: auto;
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow-md);
  animation: fadeIn 0.28s ease-out;
}

table.ac-table {
  width: 100%;
  min-width: 1200px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12.5px;
}

/* 收益页持仓/平仓：列宽与表头对齐（colgroup + fixed layout） */
table.ac-table.ac-table--grid {
  table-layout: fixed;
  min-width: 0;
  width: 100%;
  border-collapse: collapse;
}

table.ac-table.ac-table--grid col.ac-col-name {
  width: 10%;
}
table.ac-table.ac-table--grid col.ac-col-code {
  width: 9%;
}
table.ac-table.ac-table--grid col.ac-col-sw {
  width: 9%;
}
table.ac-table.ac-table--grid col.ac-col-num {
  width: 8.5%;
}
/* 超额列文案变长（今日超额收益/总计超额收益），适当加宽以避免换行 */
table.ac-table.ac-table--grid col.ac-col-num-sm {
  width: 12%;
}
table.ac-table.ac-table--grid col.ac-col-act {
  width: 12%;
}

/* 团队表现：成员 + 累计收益 + 累计超额 + 标的 + 申报 */
table.ac-table--insights-team.ac-table--grid col.ac-col-ins-team-member {
  width: 26%;
}
table.ac-table--insights-team.ac-table--grid col.ac-col-ins-num {
  width: 18.5%;
}

/* 排行榜：对比勾选 / 名次 / 名称 / 公司 / 累计收益 / 累计超额 / 标的 / 申报 */
table.ac-table--insights-lb.ac-table--grid col.ac-col-ins-lb-cb {
  width: 3.5%;
}
table.ac-table--insights-lb.ac-table--grid col.ac-col-ins-lb-rank {
  width: 4.5%;
}
table.ac-table--insights-lb.ac-table--grid col.ac-col-ins-lb-name {
  width: 14%;
}
table.ac-table--insights-lb.ac-table--grid col.ac-col-ins-lb-co {
  width: 20%;
}
table.ac-table--insights-lb.ac-table--grid col.ac-col-ins-num {
  width: 15.25%;
}

/* 洞察页：双图并排（窄屏纵向堆叠） */
.insights-charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 12px 0 18px;
  padding: 0 4px;
  box-sizing: border-box;
}

@media (max-width: 900px) {
  .insights-charts-row {
    grid-template-columns: 1fr;
  }
}

.insights-chart-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px 10px;
  box-sizing: border-box;
  min-width: 0;
}

.insights-chart-title {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 8px;
}

.insights-chart-canvas-wrap {
  position: relative;
  height: 220px;
  width: 100%;
}

table.ac-table--insights-team.ac-table--grid .th-name,
table.ac-table--insights-team.ac-table--grid .td-name,
table.ac-table--insights-lb.ac-table--grid .th-name,
table.ac-table--insights-lb.ac-table--grid .td-name,
table.ac-table--insights-lb.ac-table--grid .th-ins-lb-co,
table.ac-table--insights-lb.ac-table--grid .td-ins-lb-co {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

table.ac-table--insights-lb.ac-table--grid .td-muted.td-ins-lb-co {
  max-width: none;
}

table.ac-table--insights-lb.ac-table--grid .th-cb,
table.ac-table--insights-lb.ac-table--grid .td-cb {
  text-align: center;
  width: 1%;
  white-space: nowrap;
  vertical-align: middle;
}
table.ac-table--insights-lb.ac-table--grid .th-rank,
table.ac-table--insights-lb.ac-table--grid .td-rank-n {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

table.ac-table.ac-table--grid .th-name,
table.ac-table.ac-table--grid .td-name,
table.ac-table.ac-table--grid .th-sw,
table.ac-table.ac-table--grid .td-sw {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

table.ac-table.ac-table--grid thead th.th-num,
table.ac-table.ac-table--grid thead th.th-act {
  text-align: right;
}

table.ac-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f1f5f9;
  color: #475569;
  font-weight: 700;
  text-align: left;
  padding: 12px 14px;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

table.ac-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  white-space: nowrap;
}

table.ac-table tbody tr:hover {
  background: #f8fafc;
}

table.ac-table tbody tr.tr-pending {
  background: #fffaf0;
}

.th-id,
.td-id {
  width: 70px;
}

.th-name,
.td-name {
  min-width: 180px;
}

.th-upd,
.td-upd {
  min-width: 150px;
}

.th-code,
.td-code {
  width: 90px;
}

.th-num {
  text-align: right;
}

td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

td.num.up {
  color: var(--profit-up);
  font-weight: 700;
}

td.num.down {
  color: var(--profit-down);
  font-weight: 700;
}

.code-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #ffebee;
  color: var(--primary);
  font-weight: 700;
  font-size: 12px;
}

.td-name .nm {
  font-weight: 700;
  color: #111;
  font-size: 13px;
  line-height: 1.2;
}

.pr-inline {
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pr-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 6px;
  background: #ffebee;
  color: var(--primary);
  font-weight: 800;
  font-size: 12px;
}

.pr-amount {
  color: #5d4037;
  font-size: 12px;
}

.td-status .st {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: #eceff1;
  color: #37474f;
  font-weight: 700;
  font-size: 12px;
}

.td-act {
  width: 160px;
}

.act-row {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
}

.ico-btn {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  background: #ffffff;
  cursor: pointer;
  padding: 0;
}

.ico-btn svg {
  width: 16px;
  height: 16px;
  fill: #607d8b;
}

.ico-btn:hover {
  border-color: #d7d7d7;
  background: #fafafa;
}

.ico-btn.warn svg {
  fill: #c62828;
}

.table-foot-hint {
  padding: 10px 4px 4px;
}

a.link {
  color: var(--primary);
  text-decoration: none;
  font-size: 14px;
}

a.link:hover {
  text-decoration: underline;
}

/* 固定顶栏：滚动时主导航与用户信息始终可见 */
.app-sticky {
  position: sticky;
  top: 0;
  z-index: 200;
  background: #ffffff;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  margin: 0;
  padding: 0;
  box-shadow: none;
}

/* 导航条与内容区留出呼吸感 */
.app-sticky + * {
  margin-top: 12px;
}

main#app.page-list-full .app-sticky {
  margin: 0;
}

.app-sticky-inner {
  max-width: 100%;
}

.shell-nav-grid {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  height: 56px;
  padding: 0 16px;
}

.shell-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--primary);
  min-width: 0;
}

.shell-logo {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.shell-logo svg {
  width: 34px;
  height: 34px;
}

.shell-logo-img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  display: block;
}

.shell-brand-text {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.shell-nav {
  --shell-item-h: 56px;
  display: flex;
  align-items: center;
  justify-content: stretch;
  gap: 0; /* 顶部导航无间隙 */
  width: 100%;
}

.shell-nav-a {
  text-decoration: none;
  color: #334155;
  font-weight: 800;
  letter-spacing: 0.2px;
  height: var(--shell-item-h);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: 0;
  text-align: center;
  background: transparent;
  border: none;
  border-left: 1px solid rgba(15, 23, 42, 0.08);
  user-select: none;
  /* 导航字号需 >= 品牌文字（18px） */
  font-size: 20px;
  letter-spacing: 0.35px;
  /* 顶部导航铺满：等分 */
  flex: 1 1 0;
}

.shell-nav-a:first-child {
  border-left: none;
}

.shell-nav-a:hover {
  background: rgba(198, 40, 40, 0.06);
}

.shell-nav-a.on {
  color: var(--primary);
  background: rgba(198, 40, 40, 0.10);
  box-shadow: inset 0 -3px 0 0 var(--primary);
}

.shell-user {
  --shell-item-h: 56px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: var(--shell-item-h);
  padding: 0 10px;
  border-radius: 0;
  background: transparent;
  border: none;
  border-left: 1px solid rgba(15, 23, 42, 0.08);
  cursor: pointer;
  color: #0f172a;
  min-width: 0;
  width: auto;
  max-width: 200px;
  justify-self: end;
}

.shell-user:hover {
  background: rgba(241, 245, 249, 1);
}

.shell-user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: #fff;
  background: var(--primary);
  flex: 0 0 auto;
}

.shell-user-name {
  font-weight: 800;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 1020px) {
  .shell-brand-text {
    display: none;
  }
}

@media (max-width: 760px) {
  .shell-nav-grid {
    grid-template-columns: 1fr;
  }
  .shell-user {
    justify-self: start;
    max-width: none;
  }
}

.app-sticky-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.app-sticky-left {
  display: flex;
  align-items: center;
  gap: 12px 20px;
  flex-wrap: wrap;
  min-width: 0;
}

.app-sticky-brand {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.shell-nav {
  flex-wrap: wrap;
}

.app-sticky-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.shell-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: none;
  background: transparent;
  padding: 4px 8px;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
}

.shell-user-chip:hover {
  background: #fff;
  box-shadow: 0 0 0 1px #eeeeee;
}

.shell-logout {
  flex-shrink: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

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

.nav-a {
  text-decoration: none;
  color: var(--muted);
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.nav-a:hover {
  background: #ffffff;
  border-color: var(--border);
}

.nav-a.on {
  color: var(--primary);
  background: #ffebee;
  border-color: #ffcdd2;
  font-weight: 700;
}

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

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 1100px) {
  main#app,
  main#app.page-list-full {
    width: 96vw;
    min-width: 0;
    padding-left: 10px;
    padding-right: 10px;
  }
  .grid2 {
    grid-template-columns: 1fr;
  }
}

.card-ht {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}

.chart-wrap {
  height: 240px;
  margin-top: 10px;
}

/* 与方案一致：图表区占位（现有 pnl 使用 .chart-wrap，此处供并列模块复用） */
.chart-container {
  position: relative;
  height: 200px;
  width: 100%;
}

.chart-label {
  text-align: center;
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

.seg2 {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: #f5f5f5;
  border: 1px solid #eeeeee;
}

.seg2-i {
  border: none;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 999px;
  background: transparent;
  font-size: 13px;
  color: #546e7a;
}

.seg2-i.on {
  background: #ffffff;
  color: var(--primary);
  font-weight: 800;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
}

/* 收益页：当季/当月/全量（锚点与按钮共用 seg2 样式） */
.list-preset-strip {
  margin-bottom: 12px;
}

.list-preset-strip a.seg2-i {
  text-decoration: none;
  display: inline-block;
  color: inherit;
}

.list-preset-strip a.seg2-i.on {
  color: var(--primary);
}

/* 申报页：新股一行 */
.new-stock-card {
  padding-top: 12px;
  padding-bottom: 12px;
}

label.new-stock-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  cursor: pointer;
  min-height: 40px;
}

label.new-stock-line .lab {
  margin-bottom: 0;
}

label.new-stock-line input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* 说明性文字统一沉底 */
.page-foot-notes {
  margin-top: 20px;
  margin-bottom: 32px;
  padding: 14px 16px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  color: var(--muted);
  line-height: 1.5;
}

.page-foot-notes p {
  margin: 0 0 8px;
}

.page-foot-notes p:last-child {
  margin-bottom: 0;
}

.top-title {
  font-size: 18px;
  font-weight: 600;
}

.page-ht {
  font-size: 22px;
  font-weight: 600;
  color: var(--primary);
  margin: 8px 0 12px;
}

.subh {
  font-size: 16px;
  font-weight: 600;
  margin: 20px 0 8px;
  padding: 0 4px;
}

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

.small,
.small {
  font-size: 13px;
  color: var(--muted);
}

.market-hint {
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 13px;
  color: #5d4037;
}

.card {
  background: var(--card);
  border-radius: var(--radius-card);
  padding: 16px 18px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  animation: fadeIn 0.3s ease-out;
}

.card.pad {
  padding: 18px 20px;
}

.lab {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

.inp {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  margin-bottom: 10px;
  background: #f8fafc;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.inp:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.2);
}

.row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

/* 申报页动作区：两按钮等宽、居中对齐 */
.btn-row.plan-actions {
  justify-content: center;
  padding: 6px 0 2px;
}

.btn-row.plan-actions .btn {
  width: 220px;
}

@media (max-width: 520px) {
  .btn-row.plan-actions .btn {
    width: 100%;
  }
}

.btn {
  border: none;
  border-radius: var(--radius-btn);
  padding: 12px 18px;
  font-size: 15px;
  cursor: pointer;
  background: #e2e8f0;
  color: var(--text);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.15s ease;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn.primary {
  background: linear-gradient(135deg, var(--primary-dim), var(--primary));
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(198, 40, 40, 0.22);
}

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

.btn.ghost {
  background: #fff;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn.ghost:hover {
  background: #fff5f5;
}

.btn.sm {
  padding: 6px 12px;
  font-size: 13px;
}

.btn.full-width {
  width: 100%;
}

.primary-sw-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding: 4px 0 12px;
}

.primary-sw-title {
  width: 100%;
  font-size: 12px;
  color: var(--muted);
}

.primary-sw-chip {
  font-size: 13px;
  color: #37474f;
  background: #eceff1;
  padding: 6px 12px;
  border-radius: 6px;
}

.user-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0 8px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.avatar-ph {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ffebee;
  color: var(--primary);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.user-nick {
  font-weight: 600;
  font-size: 15px;
}

.sym-wrap {
  position: relative;
}

.sym-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 20;
  max-height: 220px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-top: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.sym-opt {
  padding: 10px 12px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  font-size: 14px;
}

.sym-opt:hover {
  background: #fff5f5;
}

.opt-code {
  font-weight: 600;
  margin-right: 8px;
}

.opt-name {
  color: var(--muted);
  margin-right: 8px;
}

.opt-sw {
  font-size: 12px;
  color: #2e7d32;
}

.picked-sw-line {
  font-size: 13px;
  color: #424242;
  margin-top: 6px;
}

.cache-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.conf-row,
.dir-row,
.seg {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.pill {
  min-width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
}

.pill.on {
  background: #ffebee;
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
}

.dir-btn {
  flex: 1;
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-size: 15px;
}

.dir-btn.on {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.seg-i {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  text-align: center;
  font-size: 14px;
}

.seg-i.on {
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
  background: #fff5f5;
}

.remaining {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}

.list-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.list-item:last-child {
  border-bottom: none;
}

.list-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.list-actions--row {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.list-item--pending {
  align-items: center;
}

.pending-inline {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 6px 10px;
  flex: 1;
  min-width: 0;
  font-size: 14px;
  line-height: 1.45;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.pending-inline strong {
  font-weight: 600;
  flex-shrink: 0;
}

.pending-inline span {
  font-weight: 400;
  color: var(--muted);
  white-space: nowrap;
}

.tag {
  display: inline-block;
  margin-left: 6px;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
  background: #eee;
}

.code-line {
  font-size: 14px;
  color: var(--muted);
}

.t {
  font-size: 18px;
  font-weight: 600;
}

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

.plan .ac-row-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pnl-hist-card {
  margin-bottom: 12px;
}

.pnl-hist-canvas-wrap {
  position: relative;
  height: 220px;
  width: 100%;
  margin-top: 8px;
}

.note {
  margin-top: 8px;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.sheet {
  width: 100%;
  max-width: 720px;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 12px 16px calc(16px + env(safe-area-inset-bottom));
}

/* 减仓弹层：视口正中、卡片更大、内容居中（不影响底部菜单 overlay） */
.overlay--center {
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  box-sizing: border-box;
}

.sheet--reduce {
  max-width: min(560px, 100%);
  border-radius: 16px;
  padding: 22px 28px 26px;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.sheet--reduce .lab {
  font-size: 15px;
  margin-bottom: 8px;
}

.sheet-reduce-hint {
  text-align: center;
  margin: 0 0 4px;
  max-width: 42em;
  margin-left: auto;
  margin-right: auto;
}

.sheet-reduce-seg {
  justify-content: center;
  margin: 14px 0;
}

.sheet-reduce-seg .seg-i {
  flex: 0 1 200px;
  max-width: 240px;
}

.sheet-reduce-blk {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.sheet-reduce-blk input[type="range"] {
  width: 100%;
  max-width: 400px;
}

/* 百分比数值与 % 同一行、不换行 */
.sheet-reduce-pct-readout {
  display: inline-flex;
  flex-direction: row;
  align-items: baseline;
  justify-content: center;
  gap: 0;
  white-space: nowrap;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.sheet-reduce-pct-sym {
  margin-left: 1px;
}

.sheet-reduce-blk .inp {
  max-width: 320px;
  margin-bottom: 0;
  text-align: center;
}

.sheet-reduce-actions {
  justify-content: center;
  margin-top: 20px;
}

.sheet-btn {
  display: block;
  width: 100%;
  padding: 14px;
  margin: 6px 0;
  border: none;
  border-radius: 10px;
  background: #f5f5f5;
  font-size: 16px;
  cursor: pointer;
}

.sheet-btn.danger {
  color: var(--primary);
  font-weight: 600;
}

/* 顶栏头像下拉的账户菜单：居中显示、宽度收敛、阴影更明显 */
.sheet--user-menu {
  width: min(360px, 100%);
  max-width: 360px;
  border-radius: 14px;
  padding: 20px 22px 22px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.28);
}

.sheet--profile-edit {
  width: min(560px, 100%);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  border-radius: 14px;
  padding: 20px 22px 22px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.28);
}

.profile-edit-textarea {
  min-height: 72px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.45;
}

.profile-edit-actions {
  justify-content: flex-end;
}

.profile-edit-actions .btn {
  min-width: 112px;
}

.user-menu-overlay .user-menu-title,
.profile-edit-overlay .user-menu-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  text-align: center;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 80px;
  transform: translateX(-50%) translateY(20px);
  background: rgba(0, 0, 0, 0.82);
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  max-width: 90vw;
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.pad {
  padding: 8px 4px;
}

.pending-reduce-hint {
  margin-top: 8px;
  padding: 8px 10px;
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 8px;
  font-size: 13px;
  color: #5d4037;
}
.pending-reduce-hint .pr-tag {
  display: inline-block;
  padding: 2px 8px;
  margin-right: 6px;
  font-weight: 600;
  font-size: 12px;
  color: #c62828;
  background: #ffebee;
  border-radius: 4px;
}
.pending-reduce-hint .pr-amount {
  font-size: 13px;
}
.pending-reduce-hint .pr-notice {
  margin-top: 6px;
  color: #8d6e63;
  line-height: 1.4;
}

.pending-reduce-card {
  background: #fff8e1;
  border: 1px solid #ffe082;
}
.pending-reduce-card .pr-notice {
  margin-top: 8px;
  color: #8d6e63;
  line-height: 1.45;
}

/* 收益页：账户总览（区间总收益 + 区间总超额收益） */
.account-overview {
  margin: 4px 0 14px;
}

.account-overview-card {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 0;
  padding: 18px 22px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  animation: fadeIn 0.28s ease-out;
}

.overview-metric {
  text-align: center;
  padding: 6px 12px;
  min-width: 0;
}

.overview-metric-label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.4px;
  margin-bottom: 6px;
}

.overview-metric-value {
  font-size: 30px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  color: var(--text);
}

.overview-metric-sub {
  margin-top: 6px;
  font-size: 11px;
  color: #94a3b8;
  letter-spacing: 0.2px;
}

.overview-metric--up .overview-metric-value {
  color: var(--profit-up);
}

.overview-metric--down .overview-metric-value {
  color: var(--profit-down);
}

.overview-metric--muted .overview-metric-value {
  color: #94a3b8;
}

.overview-divider {
  width: 1px;
  background: var(--border);
  margin: 8px 0;
}

.account-overview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  padding: 8px 4px 0;
  font-size: 12px;
  color: var(--muted);
}

.account-overview-meta-pill {
  background: #eef2f7;
  color: #475569;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.account-overview-meta-hint {
  color: #b45309;
}

@media (max-width: 720px) {
  .account-overview-card {
    grid-template-columns: 1fr;
  }
  .overview-divider {
    display: none;
  }
  .overview-metric + .overview-metric {
    border-top: 1px dashed var(--border);
    padding-top: 16px;
  }
}

/* 收益页：少字 + 表格式 + 悬停说明 */
.kv-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  font-size: 14px;
  padding: 10px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  animation: fadeIn 0.25s ease-out;
}

.kv-strip .kv-title {
  font-weight: 800;
  color: var(--text);
  margin-right: 4px;
}

.kv-strip .kv-pill {
  font-size: 12px;
  color: var(--muted);
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 6px;
}

.kv-strip .tip-ico {
  cursor: help;
  color: #9e9e9e;
  font-size: 15px;
  line-height: 1;
}

.sec-table-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 18px 0 8px;
  padding: 0 2px;
}

.tip-help {
  cursor: help;
  color: #9e9e9e;
  font-size: 14px;
  font-weight: 500;
}

table.ac-table.ac-table--dense {
  min-width: 900px;
  font-size: 12.5px;
}

/* 带 colgroup 的网格表：不强制 900px 以免与 100% 列宽冲突 */
table.ac-table.ac-table--dense.ac-table--grid {
  min-width: 0;
}

th.th-xs,
table.ac-table .th-num.th-xs {
  min-width: 64px;
  max-width: 80px;
  font-size: 11.5px;
  padding-left: 6px;
  padding-right: 6px;
}

.th-act,
.td-act {
  width: 100px;
  text-align: right;
  white-space: nowrap;
}

.td-time {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 12px;
}

.td-muted {
  color: var(--muted);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}

table.ac-table tbody tr.tr-highlight {
  background: #fff8e1;
  outline: 1px solid #ffe082;
}

.td-rank {
  font-weight: 600;
}

/* 紧凑表：与 ac-table 同用，更疏的 padding 时加 class="compact-table" */
.table-wrap .compact-table,
table.compact-table {
  width: 100%;
  font-size: 13px;
  border-collapse: collapse;
}

table.compact-table thead th {
  background: #f8fafc;
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  color: #475569;
  border-bottom: 2px solid var(--border);
}

table.compact-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
}

table.compact-table tbody tr:hover {
  background: #f8fafc;
}

/* 指标块：少字场景下用数字 + 短标签 */
.icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.icon-item {
  text-align: center;
  padding: 16px 12px;
  background: #f8fafc;
  border-radius: var(--radius-btn);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.icon-item .value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.icon-item .label {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.btn:not(.primary):not(.ghost):hover {
  background: #cbd5e1;
}
