/* ===================== 全局基础样式 ===================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #f5f7fa;
  color: #333;
  font-size: 14px;
  line-height: 1.5;
}
button {
  border: none;
  outline: none;
  cursor: pointer;
  background: none;
  font-family: inherit;
}
input {
  outline: none;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 14px;
  font-family: inherit;
  width: 100%;
}
input:focus {
  border-color: #1677ff;
}

/* ===================== 通用按钮样式 ===================== */
.primary-btn {
  background: #1677ff;
  color: #fff;
  border-radius: 4px;
  padding: 8px 16px;
  font-size: 14px;
  transition: background 0.2s;
}
.primary-btn:hover {
  background: #4096ff;
}
.primary-btn.small {
  padding: 6px 12px;
  font-size: 13px;
}
.cancel-btn {
  background: #fff;
  color: #666;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  padding: 8px 16px;
  font-size: 14px;
  transition: all 0.2s;
}
.cancel-btn:hover {
  color: #1677ff;
  border-color: #1677ff;
}
.text-btn {
  color: #1677ff;
  font-size: 14px;
  padding: 4px 8px;
}
.tip-text {
  color: #ff4d4f;
  font-size: 12px;
  margin-top: 8px;
  text-align: center;
}
/* ---------- 全局 Toast 通知 ---------- */
.toast-container {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  z-index: 99999; display: flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: none; max-width: min(88vw, 360px); width: max-content;
}
.toast {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 10px; font-size: 13px; line-height: 1.4; color: #fff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18); pointer-events: auto; max-width: 100%;
  word-break: break-all; animation: toast-in 0.22s ease;
}
.toast.success { background: #10b981; }
.toast.error { background: #e63950; }
.toast.info { background: #1677ff; }
.toast .toast-icon { flex-shrink: 0; font-size: 15px; line-height: 1; }
.toast.hide { opacity: 0; transform: translateY(-8px); transition: opacity 0.3s ease, transform 0.3s ease; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}
.loading {
  text-align: center;
  color: #999;
  padding: 30px 0;
  font-size: 13px;
}
.empty-page {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

/* ===================== 登录注册页 ===================== */
.auth-box {
  max-width: 360px;
  margin: 100px auto;
  background: #fff;
  border-radius: 8px;
  padding: 30px 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  display: block;
}
.auth-tabs {
  display: flex;
  margin-bottom: 24px;
  border-bottom: 1px solid #f0f0f0;
}
.tab-btn {
  flex: 1;
  padding: 10px 0;
  font-size: 16px;
  color: #666;
  position: relative;
}
.tab-btn.active {
  color: #1677ff;
  font-weight: 500;
}
.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 2px;
  background: #1677ff;
  border-radius: 1px;
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.auth-form .primary-btn {
  margin-top: 8px;
  width: 100%;
  padding: 10px;
  font-size: 15px;
}

/* ===================== 主应用框架 ===================== */
/* 主应用默认隐藏，由 JS 根据登录状态控制 display */
.main-app {
  min-height: 100vh;
  display: none;
  flex-direction: column;
}
.page-content {
  flex: 1;
  padding-bottom: 96px;
}
.page-item {
  display: none;
}
.page-item.active {
  display: block;
}
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}
.page-header h2 {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}
.header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* 汇总数据栏 - 位于标题下方(第一行总持仓金额, 第二行今日收益/今日收益率/持仓总收益) */
.fund-summary-bar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: #eef4fd;   /* 浅蓝衬底, 与列表白底形成轻区分 */
  padding: 12px 16px 14px;
  border-bottom: 1px solid #e0e9f9;
  position: sticky;
  top: 57px;
  z-index: 9;
}
.summary-main { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.summary-label {
  font-size: 12px;
  color: #8c90a3;
  line-height: 1.2;
  font-weight: 400;
  white-space: nowrap;   /* 今日收益(日期) 同行展示 */
}
.summary-main .summary-label { font-size: 13px; }
.summary-value {
  font-size: 15px;
  font-weight: 600;
  color: #333;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;   /* 数字等宽, 刷新跳动不抖 */
}
.summary-main .summary-value {
  font-size: 24px;
  font-weight: 700;
  color: #141a45;
  letter-spacing: .3px;
}
.summary-value.profit { color: #f5222d; }
.summary-value.loss { color: #52c41a; }
.summary-sub-row { display: flex; margin-top: 12px; align-items: center; }
.summary-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: left;
align-content: center;
flex-wrap: wrap;
}
/* 均分列的边界分区: 后两列加极细分隔, 让"左侧内容+右侧空隙"视觉上分区清晰 */
.summary-item:not(:first-child) { border-left: 1px solid #dee8f8; padding-left: 12px; }
/* 汇总栏"添加持仓"按钮已移至标题栏, 此样式不再使用 */
.summary-time {
  font-size: 10px;
  color: #8c90a3;
  line-height: 1.2;
  margin-left: 2px;
}

/* 分组选择器通用 */
.group-select {
  padding: 6px 8px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  font-size: 13px;
  background: #fff;
  outline: none;
  cursor: pointer;
}
.group-select:focus {
  border-color: #1677ff;
}

/* 分组标签栏 */
.group-tab-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  padding: 8px 16px;
  position: sticky;
  top: 113px;
  z-index: 6;
}
.group-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  flex: 1;
  padding: 6px 0;
  scrollbar-width: none;
}
.group-tabs::-webkit-scrollbar {
  display: none;
}
.group-tab-item,
.zx-group-tab-item {
  flex-shrink: 0;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  color: #666;
  cursor: pointer;
  transition: all 0.2s;
}
.group-tab-item.active,
.zx-group-tab-item.active {
  background: #e6f4ff;
  color: #1677ff;
  font-weight: 500;
}
.group-tab-item:hover,
.zx-group-tab-item:hover {
  background: #f5f7fa;
}
/* 自选页笔记行 */
.zx-note {
  margin-top: 2px;
  font-size: 11px;
  color: #999;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}
/* 笔记标记(一眼可见有笔记) */
.zx-note-badge {
  flex-shrink: 0;
  font-size: 9px;
  color: #1677ff;
  background: #e6f4ff;
  border: 1px solid #91caff;
  border-radius: 4px;
  padding: 0 4px;
  line-height: 14px;
font-weight: 500;
}
/* 持仓列表: 待确认加仓/减仓提示 */
.fund-pending {
  margin-top: 2px;
  font-size: 11px;
  color: #d97706;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* 加仓/减仓弹窗: 15:00前/后 时间选择 */
.time-slot-radio {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px 0;
}
.time-slot-radio .radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #333;
}
.time-slot-radio .radio-label input[type="radio"] {
  accent-color: #1677ff;
  width: auto;
  height: auto;
  padding: 0;
  border: none;
  border-radius: 0;
  flex-shrink: 0;
}
/* 加仓/减仓: 费率 + 估算手续费行 */
.fee-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
/* 添加持仓弹窗: "今日买入"勾选项 */
.form-check {
  display: flex; align-items: flex-start; gap: 6px;
  font-size: 13px; color: var(--ui-text-2);
  margin: 2px 0 14px; cursor: pointer; line-height: 1.5;
}
.form-check input {
  width: 16px; height: 16px; margin-top: 1px; flex-shrink: 0;
  accent-color: var(--ui-primary, #1677ff);
}
/* 手续费规则说明(弹窗底部) */
.fee-rule {
  margin-top: 12px; padding: 10px 12px;
  background: #f7f9fc; border: 1px solid #eceff5; border-radius: 8px;
  font-size: 11.5px; line-height: 1.7; color: #8c90a3;
}
.fee-rule .fr-title { font-size: 12px; font-weight: 600; color: #5a6072; margin-bottom: 2px; }
.fee-rule p { margin: 0; }
body.dark .fee-rule { background: #1e2028; border-color: #2a2a30; color: #8b92a3; }
body.dark .fee-rule .fr-title { color: #c6cad6; }
.fee-row input[type="number"] {
  flex: 1;
  min-width: 0;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  box-sizing: border-box;
}
.fee-row .fee-est {
  flex-shrink: 0;
  font-size: 12px;
  color: #d97706;
}
.fee-est {
  color: #d97706;
  font-size: 12px;
}
/* 自选记笔记输入框 */
.zx-note-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  min-height: 72px;
}
/* 笔记历史列表 */
.zx-note-history {
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid #f0f0f0;
  border-radius: 6px;
  padding: 4px 8px;
  margin-bottom: 12px;
  background: #fafbfc;
}
.zx-note-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 2px;
  border-bottom: 1px dashed #ececec;
  font-size: 13px;
}
.zx-note-item:last-child {
  border-bottom: none;
}
.zx-note-text {
  flex: 1;
  color: #333;
  word-break: break-all;
}
.zx-note-time {
  flex-shrink: 0;
  font-size: 11px;
  color: #999;
}
/* 分组管理按钮缩小字体 */
#openGroupManageBtn {
  font-size: 12px;
  flex-shrink: 0;
}

/* 底部导航 */
.bottom-nav {
  position: fixed;
  bottom: 26px;
  left: 0;
  right: 0;
  height: 56px;
  background: #fff;
  border-top: 1px solid #f0f0f0;
  display: flex;
  z-index: 20;
}

/* 页脚免责声明(小字体灰色, 固定在屏幕最底部, 导航让出位置) */
.app-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 26px;
  padding: 0 16px;
  text-align: center;
  font-size: 11px;
  color: #999;
  line-height: 26px;
  background: #fff;
  border-top: 1px solid #f5f5f5;
  z-index: 19;
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #8c8c8c;
  font-size: 12px;
  cursor: pointer;
  transition: color 0.2s ease;
}
.nav-item.active {
  color: #1677ff;
}
.nav-icon {
  font-size: 22px;
  line-height: 1;
  font-weight: 600;
}

/* ===================== 基金列表（彻底重铸版） ===================== */
/*
 * 设计原则：
 * 1. 所有列宽度平均分配（flex: 1），间距用 gap 控制
 * 2. 所有列内容居中对齐（text-align: center）
 * 3. 表头不换行，数据行基金名称可换行完整显示
 * 4. PC/手机响应式适配
 */

/* === 表头与数据行容器 === */
.fund-list-header,
.fund-item {
  display: flex;
  align-items: center;
  padding: 12px 8px;
  box-sizing: border-box;
  gap: 8px;
}

.fund-list-header {
  background: #f5f7fa;
  font-size: 12px;
  font-weight: 500;
  color: #666;
  border-bottom: 1px solid #e8e8e8;
  position: sticky;
  top: 145px;
  z-index: 5;
}

.fund-item {
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background 0.15s ease;
  min-height: 48px;
}

.fund-item:hover {
  background: #fafbfc;
}

.fund-item:active {
  background: #f5f5f5;
}

/* === 列：平均分配宽度，全部居中对齐 === */
.col {
  flex: 1 1 0;
  min-width: 0;
  box-sizing: border-box;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* 名称列占更大宽度比例（占 3 份），其他数字列各占 1.5 份 */
.col-name {
  flex: 3 1 0;
}

.col-value,
.col-day-profit,
.col-total-profit {
  flex: 1.5 1 0;
}

/* 操作列固定宽度 */
.col-action {
  flex: 0 0 22px;
}

/* 自选页 笔记列(宽于普通数字列, 内容省略号处理) */
.col-note {
  flex: 2 1 0;
  flex-direction: row;
  gap: 4px;
  overflow: hidden;
}
.col-note .note-badge {
  flex-shrink: 0; font-size: 10px; color: #1677ff;
  border: 1px solid #1677ff; border-radius: 4px; padding: 0 3px; line-height: 1.5;
}
.col-note .note-text {
  font-size: 11px; color: #8c90a3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
body.dark .col-note .note-text { color: #8a8d99; }

/* === 表头单元格 === */
.fund-list-header .col {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* === 净值/估值、当日收益 — 表头 === */
.fund-list-header .col-value,
.fund-list-header .col-day-profit {
  padding-left: 0;
}

/* 可排序表头 */
.sortable-th {
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: color 0.15s;
  position: relative;
  padding-right: 12px;
}

.sortable-th:hover {
  color: #1677ff;
}

.sortable-th::after {
  content: '⇅';
  font-size: 10px;
  color: #d9d9d9;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.sortable-th.desc::after {
  content: '↓';
  color: #1677ff;
}

.sortable-th.asc::after {
  content: '↑';
  color: #1677ff;
}

/* === 基金名称列：整体在列内居中（与其他列自适应一致） === */
.fund-name-info {
  width: 100%;
  align-items: flex-start;   /* 整体在列内左对齐 */
  text-align: left;
}

.fund-name-info .name {
  font-size: 13px;
  font-weight: 500;
  color: #333;
  line-height: 1.4;
  word-break: break-all;
  overflow-wrap: break-word;
  white-space: normal;
  text-align: left;           /* 多行时每行都左对齐 */
  width: 100%;
  max-width: 100%;
}

.fund-name-info .sub {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  margin-top: 4px;
  font-size: 11px;
  color: #999;
  line-height: 1;
  width: 100%;
}

.fund-name-info .sub .fund-code-cell,
.fund-name-info .sub span:not(.group-tag):not(.fund-group-tag) {
  white-space: nowrap;
}

.updated-tag {
  display: inline-block;
  font-size: 10px;
  padding: 1px 4px;
  background: #e6f4ff;
  color: #1677ff;
  border-radius: 2px;
  margin-left: 4px;
  white-space: nowrap;
  vertical-align: middle;
font-weight: 500;
}

/* 分组首字符小标签 */
.group-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  line-height: 1;
  font-size: 11px;
  font-weight: 600;
  color: #1677ff;
  background: #e6f4ff;
  border-radius: 4px;
  margin-right: 6px;
  vertical-align: middle;
}

/* === 净值/估值列：内容右移1px === */
.fund-value-info {
  width: 100%;
  padding-left: 1px;
  box-sizing: border-box;
}

.fund-value-info .rate {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.fund-value-info .price {
  font-size: 11px;
  color: #999;
  margin-top: 2px;
  white-space: nowrap;
}

/* === 当日收益列：内容右移1px === */
.fund-day-profit {
  width: 100%;
  padding-left: 1px;
  box-sizing: border-box;
}

.fund-day-profit .day-profit-num {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.fund-day-profit .net-date {
  font-size: 11px;
  color: #999;
  margin-top: 2px;
  white-space: nowrap;
}

/* === 总收益列：内容右移1px === */
.fund-total-profit {
  width: 100%;
  padding-left: 1px;
  box-sizing: border-box;
}

.fund-total-profit .total-profit-num {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.fund-total-profit .total-rate {
  font-size: 11px;
  color: #999;
  margin-top: 2px;
  white-space: nowrap;
}

/* === 涨跌颜色 === */
.profit { color: #f5222d; }
.loss { color: #52c41a; }

/* === 操作按钮 === */
.action-btn {
  font-size: 18px;
  color: #999;
  width: 32px;
  height: 32px;
  line-height: 32px;
  text-align: center;
  border-radius: 4px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all 0.15s;
}

.action-btn:hover {
  background: #f0f0f0;
  color: #666;
}

.action-btn:active {
  background: #e8e8e8;
}

/* === PC端适配（宽度 >= 768px）=== */
@media (min-width: 768px) {
  .fund-list-header,
  .fund-item {
    padding: 14px 16px;
    gap: 12px;
  }

  .fund-name-info .name {
    font-size: 14px;
  }

  .fund-name-info .sub {
    font-size: 12px;
    gap: 12px;
  }

  .fund-value-info .rate,
  .fund-day-profit .day-profit-num,
  .fund-total-profit .total-profit-num {
    font-size: 15px;
  }

  .fund-value-info .price,
  .fund-day-profit .net-date,
  .fund-total-profit .total-rate {
    font-size: 12px;
  }

  .col-action {
    flex: 0 0 40px;
  }

  .action-btn {
    font-size: 20px;
    width: 36px;
    height: 36px;
    line-height: 36px;
  }
}

/* === 手机端适配（宽度 < 768px）=== */
@media (max-width: 767px) {
  .fund-list-header {
    font-size: 11px;
    top: 120px;
  }

  .fund-list-header .col {
    font-size: 11px;
  }

  .fund-name-info .name {
    font-size: 12px;
  }

  .fund-name-info .sub {
    font-size: 10px;
  }

  .fund-value-info .rate,
  .fund-day-profit .day-profit-num,
  .fund-total-profit .total-profit-num {
    font-size: 13px;
  }

  .fund-value-info .price,
  .fund-day-profit .net-date,
  .fund-total-profit .total-rate {
    font-size: 10px;
  }

  .updated-tag {
    font-size: 9px;
    padding: 1px 3px;
  }
}

/* ===================== 右键操作菜单 ===================== */
.context-menu {
  position: fixed;
  width: 120px;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  z-index: 100;
  overflow: hidden;
}
.menu-item {
  padding: 10px 16px;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  border-bottom: 1px solid #f5f5f5;
}
.menu-item:last-child {
  border-bottom: none;
}
.menu-item:hover {
  background: #f5f7fa;
}
.menu-item.danger {
  color: #ff4d4f;
}
.menu-item.records {
  color: #1677ff;
}
/* 详情页所属分组切换菜单 */
#detailGroupMenu {
  width: 150px;
}
.context-menu .menu-item-active {
  color: #1677ff;
  font-weight: 500;
}
/* 详情页所属分组可点击切换 */
.info-value.group-switch {
  cursor: pointer;
  color: #1677ff;
}
.group-switch::after {
  content: ' ▾';
  font-size: 11px;
}
/* 笔记删除按钮 */
.zx-note-del {
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: #bbb;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}
.zx-note-del:hover {
  color: #f5222d;
}

/* ===================== 弹窗通用 ===================== */
.modal-mask {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}
.modal-container {
  background: #fff;
  border-radius: 8px;
  width: 100%;
  max-width: 360px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid #f0f0f0;
  position: relative;
}
.modal-header h3 {
  font-size: 16px;
  font-weight: 600;
}
.close-btn {
  font-size: 22px;
  color: #999;
  line-height: 1;
}
.close-btn:hover {
  color: #333;
}
.modal-body {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
}
.modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 12px 16px;
  border-top: 1px solid #f0f0f0;
}
.form-item {
  margin-bottom: 16px;
}
.form-item label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: #666;
}
.form-desc {
  font-size: 12px;
  color: #999;
  margin-top: 6px;
}

/* 分组列表弹窗 */
.group-list {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #f0f0f0;
  border-radius: 4px;
}
.group-option {
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f5f5f5;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.group-option:last-child {
  border-bottom: none;
}
.group-option:hover {
  background: #f5f7fa;
}
.group-option.active {
  color: #1677ff;
  background: #e6f4ff;
}
.group-option input {
  width: auto;
  margin: 0;
}

/* 分组管理列表 */
.manage-group-list {
  max-height: 400px;
  overflow-y: auto;
}
.manage-group-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid #f0f0f0;
}
.manage-group-item:last-child {
  border-bottom: none;
}
.manage-group-name {
  flex: 1;
  font-size: 14px;
}
.manage-group-actions {
  display: flex;
  gap: 8px;
}
.manage-group-actions .text-btn {
  font-size: 12px;
  padding: 2px 6px;
}
.manage-group-actions .text-btn.danger {
  color: #ff4d4f;
}
.sort-handle {
  cursor: grab;
  color: #ccc;
  margin-right: 8px;
  user-select: none;
}
.sort-handle:active {
  cursor: grabbing;
}

/* ===================== 交易记录弹窗 ===================== */
.log-list {
  max-height: 60vh;
  overflow-y: auto;
}
.log-item {
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}
.log-item:last-child {
  border-bottom: none;
}
.log-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.log-top .log-time { margin-left: auto; }
.log-status {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  flex-shrink: 0;
}
.log-type-add {
  color: #f5222d;
  font-weight: 500;
}
.log-type-reduce {
  color: #52c41a;
  font-weight: 500;
}
.log-time {
  font-size: 12px;
  color: #999;
}
.log-row1, .log-row2 {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
  font-size: 13px;
  color: #666;
}
.log-row3 {
  display: flex;
  justify-content: flex-start;
  font-size: 11px;
  color: #999;
  margin-top: 2px;
}

/* ===================== 基金详情页 ===================== */
.detail-content {
  padding: 12px;
  padding-bottom: 80px;
}
.detail-section {
  background: #fff;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
}
.section-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 12px 0;
  color: #333;
  border-left: 3px solid #1677ff;
  padding-left: 8px;
}

/* 信息网格（三列等宽布局） */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px 12px;
}
/* 基金数据: 4列(第一排 代码/类型/主题/排名, 第二排 净值/估值/涨幅/时间) */
#fundDataGrid {
  grid-template-columns: 1fr 1fr 1fr 1fr;
}
.empty-cell { text-align: center; color: #999; padding: 16px; }

/* 通用数据表格 —— 表头与数据行严格垂直对齐 */
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: fixed; }
.data-table thead th { background: #fafafa; color: #666; font-weight: 500; padding: 8px 10px; border-bottom: 1px solid #eee; white-space: nowrap; vertical-align: middle; text-align: center; }
.data-table tbody td { padding: 10px 1px; border-bottom: 1px solid #f5f5f5; vertical-align: middle; text-align: center; word-break: break-all; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #fafafa; }

/* 基金经理卡片 */
.manager-card { border: 1px solid #eee; border-radius: 8px; padding: 12px; margin-bottom: 10px; }
.manager-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.manager-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.manager-name { font-size: 15px; font-weight: 600; color: #333; }
.manager-star { color: #faad14; font-size: 13px; }
.manager-section { margin-top: 8px; padding-top: 8px; border-top: 1px solid #f0f0f0; }
.manager-section-title { font-size: 12px; color: #999; margin-bottom: 4px; font-weight: 500; }
.info-row { display: flex; gap: 6px; font-size: 13px; line-height: 1.6; }
.info-row .info-label { color: #999; min-width: 70px; }

.manager-basic-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 8px 12px; margin-bottom: 8px; }
.basic-item { display: flex; flex-direction: column; gap: 2px; }
.basic-label { font-size: 12px; color: #999; }
.basic-value { font-size: 13px; color: #333; font-weight: 500; }

.manager-power-section { margin-top: 8px; padding-top: 8px; border-top: 1px solid #f0f0f0; }
.manager-power-grid-23 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 8px; }
.power-item-23 { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.power-item-23 .power-label { color: #999; font-size: 12px; }
.power-item-23 .power-value { color: #333; font-weight: 500; }

/* 同类型基金涨幅榜 */
.rank-row { display: flex; gap: 8px; margin-bottom: 8px; align-items: flex-start; }
.rank-period { font-size: 12px; color: #999; min-width: 50px; padding-top: 4px; }
.rank-items { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.rank-item { display: flex; align-items: center; gap: 4px; background: #f5f5f5; border-radius: 4px; padding: 3px 8px; font-size: 12px; }
.rank-code { color: #1677ff; }
.rank-name { color: #333; }
.rank-change { font-weight: 500; }
.rank-table .rank-period-start { border-top: 1.2px solid #666; }
.rank-table td { border-bottom: 1px solid #666; }

/* 持有人结构表格 */
.holder-table { min-width: 100%; }
.holder-table th { white-space: nowrap; font-size: 11px; }
.holder-table th:first-child, .holder-table td:first-child { text-align: center; }

/* 阶段涨幅网格 */
.perf-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px 12px; }
.perf-item { display: flex; flex-direction: column; gap: 4px; }
.perf-item .perf-label { font-size: 12px; color: #999; }
.perf-item .perf-value { font-size: 14px; font-weight: 500; }

/* 板块标题行（标题+右侧按钮） */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.section-header .section-title { margin: 0; }

/* 基金数据 / 持有明细 共用 4 列网格（两行，每行4项） */
#fundDataGrid, #holdInfoGrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 14px 12px;
}

/* 净值折线图 */
#navChart {
  background: transparent;
  display: block;
  width: 100%;
  box-sizing: border-box;
}

/* 时间段切换 tab（单位净值折线图下方） */
#navChartTabs {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  gap: 8px;
  padding: 10px 0 0;
  margin-top: 4px;
}
#navChartTabs .chart-tab {
  flex: 1;
  text-align: center;
  padding: 8px 0;
  font-size: 13px;
  color: #555;
  cursor: pointer;
  border-radius: 6px;
  background: #fafafa;
  border: 1px solid #eee;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  user-select: none;
  white-space: nowrap;
  min-width: 0;
}
#navChartTabs .chart-tab:hover {
  background: #f0f0f0;
}
#navChartTabs .chart-tab.active {
  background: #1a1a1a;
  color: #fff;
  border-color: #1a1a1a;
  font-weight: 500;
}

/* 累计业绩走势摘要 — 不换行，图例横向平均分布 */
.grand-total-summary {
  display: flex;
  flex-wrap: nowrap;
  gap: 0 14px;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #555;
  margin: 2px 0 0 0;
  min-height: 20px;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}
.gs-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
  flex-shrink: 1;
  min-width: 0;
}
.gs-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* 累计业绩折线图 — 宽度100%自适应 */
#grandTotalChart {
  background: transparent;
  display: block;
  width: 100%;
  box-sizing: border-box;
}

/* 累计业绩走势 tab — 横排、等距、激活高亮、总宽度≤图表宽度 */
#grandTotalTabs {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  margin-top: 8px;
  gap: 8px;
}
#grandTotalTabs .chart-tab {
  flex: 1;
  text-align: center;
  padding: 8px 0;
  font-size: 13px;
  color: #555;
  cursor: pointer;
  border-radius: 6px;
  background: #fafafa;
  border: 1px solid #eee;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  user-select: none;
  white-space: nowrap;
  min-width: 0;
}
#grandTotalTabs .chart-tab:hover {
  background: #f0f0f0;
}
#grandTotalTabs .chart-tab.active {
  background: #1a1a1a;
  color: #fff;
  border-color: #1a1a1a;
  font-weight: 500;
}

/* 小按钮 */
.btn { padding: 6px 12px; border: 1px solid #d9d9d9; background: #fff; border-radius: 4px; cursor: pointer; font-size: 13px; color: #333; transition: all 0.2s; }
.btn:hover { border-color: #1677ff; color: #1677ff; background: #f0f7ff; }
.btn-sm { padding: 4px 10px; font-size: 12px; }

.info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.info-label {
  font-size: 12px;
  color: #999;
  white-space: nowrap;
}
/* 净值/估值标签里的时间小号字 */
.label-date {
  font-size: 10px;
  color: #aaa;
  font-weight: 400;
  margin-left: 1px;
}
.info-value {
  font-size: 14px;
  color: #333;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.info-value.rise { color: #f5222d; }
.info-value.fall { color: #52c41a; }
.theme-tag, .fund-type-tag { color: #1677ff; }

/* 净值表格 */
.table-wrap {
  overflow-x: auto;
}
.net-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.net-table th, .net-table td {
  padding: 8px 6px;
  text-align: center;
  border-bottom: 1px solid #f0f0f0;
}
.net-table th {
  background: #fafafa;
  font-weight: 500;
  color: #666;
}
.net-table th.net-date-col,
.net-table td:first-child {
  text-align: left;
  padding-left: 10px;
}
.rise-text { color: #f5222d; }
.fall-text { color: #52c41a; }

/* 历史业绩表格 */
.perf-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.perf-table th, .perf-table td {
  padding: 8px 6px;
  text-align: center;
  border-bottom: 1px solid #f0f0f0;
}
.perf-table th {
  background: #fafafa;
  font-weight: 500;
  color: #666;
}
.perf-table th:first-child,
.perf-table td:first-child {
  text-align: left;
  padding-left: 10px;
}

/* 重仓持仓表格 */
.stock-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.stock-table th, .stock-table td {
  padding: 8px 6px;
  text-align: center;
  border-bottom: 1px solid #f0f0f0;
}
.stock-table th {
  background: #fafafa;
  font-weight: 500;
  color: #666;
}
.stock-table .stock-info {
  text-align: left;
}
.stock-table .stock-info .code {
  font-size: 12px;
  color: #999;
  margin-top: 2px;
}

/* 重仓股更新时间信息 */
.stock-update-info {
  font-size: 12px;
  color: #999;
  margin-bottom: 8px;
  line-height: 1.6;
}
.stock-update-info .fund-title {
  color: #333;
  font-weight: 500;
}

/* 详情页底部操作栏 */
.detail-action-bar {
  position: fixed;
  bottom: 82px;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #f0f0f0;
  display: flex;
  padding: 8px 8px;
  gap: 4px;
  z-index: 15;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.04);
}
.detail-action-bar.is-detail-only {
  bottom: 26px;  /* 详情页隐藏底部导航时, 操作栏停在页脚免责声明上方 */
  padding: 10px 8px calc(10px + env(safe-area-inset-bottom, 0px));
}
.detail-action-bar .action-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 0;
  font-size: 12px;
  color: #1677ff;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.detail-action-bar .action-item:hover {
  background: #e6f4ff;
  color: #0958d9;
}
.detail-action-bar .action-item.danger {
  color: #ff4d4f;
}
.detail-action-bar .action-item.danger:hover {
  background: #fff1f0;
  color: #cf1322;
}
.detail-action-bar .action-icon {
  font-size: 20px;
  line-height: 1;
  font-weight: 700;
}

/* ===================== 骨架屏样式 ===================== */
.sk-line {
  display: block;
  height: 12px;
  border-radius: 4px;
  background: linear-gradient(90deg, #eceff3 0%, #f5f7fa 50%, #eceff3 100%);
  background-size: 200% 100%;
  animation: sk-shimmer 1.2s ease-in-out infinite;
  margin: 4px 0;
}
.sk-line-long { width: 85%; height: 14px; }
.sk-line-mid  { width: 60%; height: 14px; }
.sk-line-short { width: 50%; height: 12px; }
.sk-line-small { width: 24px; height: 24px; border-radius: 6px; }
.skeleton-item {
  opacity: 0.85;
  cursor: default;
  pointer-events: none;
}
@keyframes sk-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===================== 波段信号 (复刻原APP FundRange 样式) ===================== */
.fund-range-card {
  background-color: #fff;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(20, 26, 69, 0.04);
}
.range-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 9px; }
.title-wrap { display: flex; align-items: center; }
.range-title { font-size: 17px; font-weight: 700; color: #141a45; }
.score-chip { padding: 4px 8px; border-radius: 999px; font-size: 11px; font-weight: 500; }
.score-chip.zone-buy { background: rgba(255, 64, 80, 0.1); color: #ff4050; }
.score-chip.zone-mid { background: rgba(20, 26, 69, 0.06); color: #666; }
.score-chip.zone-sell { background: rgba(12, 198, 99, 0.1); color: #0cc663; }
.state-block { padding: 30px 0 18px; text-align: center; font-size: 13px; color: #8c90a3; }
.chart-head { display: flex; gap: 8px; margin-bottom: 9px; }
.head-item { padding: 5px 10px; border-radius: 999px; font-size: 12px; color: #666; background: #f5f6f8; cursor: pointer; user-select: none; }
.head-item.active { color: #fff; background: #141a45; }
.chart-panel { border-radius: 10px; padding: 10px; background: #f9fafe; border: 1px solid #eef1f6; height: 110px; position: relative; }
.chart-disclaimer { text-align: center; font-size: 11px; color: #999; margin-top: 6px; }
.range-selected { display: flex; justify-content: space-between; margin: 9px 0 11px; font-size: 11px; color: #8c90a3; }
.signal-panel { display: flex; justify-content: space-between; align-items: center; padding: 12px 10px; border-radius: 8px; margin-bottom: 10px; margin-top: 10px; position: relative; overflow: hidden; }
.signal-panel.zone-buy { background: rgba(255, 64, 80, 0.06); border: 1px solid rgba(255, 64, 80, 0.14); }
.signal-panel.zone-buy::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: #ff4050; }
.signal-panel.zone-buy .signal-right { color: #ff4050; }
.signal-panel.zone-mid { background: #f9fafe; border: 1px solid #eef1f6; }
.signal-panel.zone-mid::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: #c0c4cc; }
.signal-panel.zone-sell { background: rgba(12, 198, 99, 0.06); border: 1px solid rgba(12, 198, 99, 0.14); }
.signal-panel.zone-sell::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: #0cc663; }
.signal-panel.zone-sell .signal-right { color: #0cc663; }
.signal-left { flex: 1; padding-left: 7px; }
.signal-title { font-size: 14px; font-weight: 600; color: #141a45; margin-bottom: 3px; }
.signal-desc { font-size: 12px; color: #8c90a3; line-height: 1.5; }
.signal-right { font-size: 16px; font-weight: 600; color: #141a45; flex-shrink: 0; margin-left: 8px; }
.score-bar { margin-bottom: 13px; }
.score-track { position: relative; height: 6px; border-radius: 999px; background: linear-gradient(90deg, rgba(255, 64, 80, 0.18), rgba(20, 26, 69, 0.12) 45%, rgba(12, 198, 99, 0.18)); }
.score-tick { position: absolute; top: -4px; width: 2px; height: 14px; border-radius: 2px; background: rgba(20, 26, 69, 0.18); }
.score-tick.buy { left: 30%; }
.score-tick.mid { left: 50%; }
.score-tick.sell { left: 70%; }
.score-marker { position: absolute; top: 50%; width: 13px; height: 13px; border-radius: 50%; background: #fff; border: 3px solid #ffcf5a; transform: translate(-50%, -50%); box-shadow: 0 0 0 4px rgba(255, 207, 90, 0.15); }
.score-axis { display: flex; justify-content: space-between; margin-top: 9px; font-size: 10px; color: #8c90a3; }
.summary-block { padding: 11px; border-radius: 10px; background: #fff; border: 1px solid #eef1f6; }
.summary-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.summary-title { font-size: 14px; font-weight: 700; color: #141a45; }
.summary-range { font-size: 11px; color: #8c90a3; }
.summary-grid { display: flex; gap: 9px; margin-bottom: 11px; }
.summary-item { flex: 1; padding: 10px 6px; border-radius: 8px; background: ; text-align: center; }
.summary-label { display: block; font-size: 11px; color: #8c90a3; margin-bottom: 6px; }
.summary-value { font-size: 17px; color: #141a45; font-weight: 600; }
.red-text { color: #ff748b !important; }
.green-text { color: #55e7ad !important; }
.profit-row { display: flex; align-items: center; margin-bottom: 8px; }
.profit-label { width: 55px; font-size: 12px; color: #666; }
.profit-line { flex: 1; height: 5px; border-radius: 999px; background: #eef1f6; overflow: hidden; margin: 0 9px; }
.profit-fill { height: 100%; border-radius: 999px; }
.profit-fill.strategy { background: linear-gradient(90deg, #1ed4ff, #27d98b); }
.profit-fill.natural { background: linear-gradient(90deg, #ff9c9c, #ff6b81); }
.profit-value { width: 60px; text-align: right; font-size: 12px; color: #141a45; }
.alpha-card { margin-top: 4px; padding: 9px 10px; border-radius: 8px; background: rgba(24, 144, 255, 0.05); border: 1px dashed rgba(24, 144, 255, 0.18); display: flex; justify-content: space-between; align-items: center; }
.alpha-label { font-size: 13px; color: #141a45; }
.alpha-value { font-size: 15px; color: #141a45; font-weight: 600; }
.summary-note, .summary-tip { text-align: center; font-size: 11px; color: #8c90a3; margin-top: 9px; }
.summary-tip { margin-top: 5px; color: #aeb5c4; }

/* ===================== 当日趋势 / 关联板块 ===================== */
.trend-tabs { display: flex; width: 100%; box-sizing: border-box; gap: 8px; margin-bottom: 10px; }
.trend-tab {
  flex: 1;
  text-align: center;
  padding: 8px 0;
  font-size: 13px;
  color: #555;
  cursor: pointer;
  border-radius: 6px;
  background: #fafafa;
  border: 1px solid #eee;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  user-select: none;
  white-space: nowrap;
  min-width: 0;
}
.trend-tab:hover { background: #f0f0f0; }
.trend-tab.active { background: #e6f4ff; color: #1677ff; border-color: #1677ff; font-weight: 500; }
.trend-chart-panel { position: relative; }
.bk-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; font-size: 12px; }
.bk-legend .bk-legend-item { display: flex; align-items: center; gap: 4px; color: #333; }
.bk-legend .bk-legend-dot { width: 10px; height: 3px; border-radius: 2px; display: inline-block; }
.trend-empty { padding: 30px 0; text-align: center; font-size: 13px; color: #8c90a3; }

/* ===================== 收益日历页 ===================== */
.calendar-content { padding: 12px 12px 80px; }
.cal-mode-tabs { display: flex; background: #eef1f6; border-radius: 10px; padding: 3px; margin-bottom: 10px; }
.cal-mode-tab {
  flex: 1; text-align: center; padding: 7px 0; font-size: 14px; color: #555;
  border-radius: 8px; cursor: pointer; user-select: none; transition: all 0.2s;
}
.cal-mode-tab.active { background: #fff; color: #1677ff; font-weight: 600; box-shadow: 0 1px 4px rgba(20, 26, 69, 0.08); }
.cal-group-tabs { display: flex; overflow-x: auto; gap: 8px; margin-bottom: 10px; padding-bottom: 2px; }
.cal-group-tab {
  flex-shrink: 0; padding: 5px 14px; font-size: 13px; color: #555; border-radius: 999px;
  background: #fff; border: 1px solid #eef1f6; cursor: pointer; user-select: none;
}
.cal-group-tab.active { color: #1677ff; border-color: #1677ff; background: #e6f4ff; font-weight: 500; }
.cal-summary-card { background: linear-gradient(135deg, #2b3a67, #1f4e79); border-radius: 14px; padding: 16px 16px 12px; color: #fff; margin-bottom: 12px; box-shadow: 0 4px 12px rgba(31, 78, 121, 0.25); }
.cal-sum-main { text-align: center; padding-bottom: 12px; }
.cal-sum-label { font-size: 14px; color: rgba(255, 255, 255, 0.75); }
.cal-sum-value { font-size: 32px; font-weight: 700; line-height: 1.3; }
.cal-sum-value.up { color: #ff7a8a; }
.cal-sum-value.down { color: #55e7ad; }
.cal-sum-sub { display: flex; border-top: 1px solid rgba(255, 255, 255, 0.18); padding-top: 10px; }
.cal-sum-sub-item { flex: 1; text-align: center; }
.cal-sum-sub-item .lbl { display: block; font-size: 13px; color: rgba(255, 255, 255, 0.7); }
.cal-sum-sub-item .val { display: block; font-size: 16px; font-weight: 600; margin-top: 2px; }
.cal-sum-sub-item .val.up { color: #ff7a8a; }
.cal-sum-sub-item .val.down { color: #55e7ad; }
.cal-grid-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 4px 10px; }
.cal-grid-head .cal-prev, .cal-grid-head .cal-next { font-size: 16px; color: #555; cursor: pointer; padding: 4px 10px; user-select: none; }
.cal-grid-head .cal-title { font-size: 13px; font-weight: 500; color: #141a45; cursor: pointer; user-select: none; }
.cal-grid { display: flex; flex-wrap: wrap; background: #fff; border-radius: 12px; padding: 8px 6px; margin-bottom: 14px; box-shadow: 0 1px 4px rgba(20, 26, 69, 0.06); }
.cal-week-head { width: 20%; text-align: center; font-size: 11px; color: #8c90a3; padding: 4px 0; }
.cal-date-cell { width: 20%; padding: 4px; }
.cal-date-cell .cell-inner {
  border-radius: 10px; padding: 10px 2px; text-align: center; cursor: pointer; position: relative;
  border: 1px solid transparent; transition: all 0.15s; background: #f7f9fc;
}
.cal-date-cell .cell-day { font-size: 12px; color: #333; }
.cal-date-cell .cell-profit { font-size: 13px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-date-cell.profit .cell-profit { color: #f5222d; }
.cal-date-cell.loss .cell-profit { color: #10b981; }
.cal-date-cell.zero .cell-profit { color: #8c90a3; }
.cal-date-cell.empty .cell-inner { background: transparent; cursor: default; }
.cal-date-cell.selected .cell-inner { border-color: #1677ff; background: #e6f4ff; }
.cal-date-cell.is-today .cell-day { color: #1677ff; font-weight: 700; }
.cal-date-cell .cell-rate { position: absolute; top: 2px; right: 4px; font-size: 8px; color: #8c90a3; }
.cal-month-cell, .cal-year-cell { width: 33.33%; padding: 6px; }
.cal-month-cell .cell-inner, .cal-year-cell .cell-inner {
  border-radius: 10px; padding: 14px 2px; text-align: center; cursor: pointer;
  background: #f7f9fc; border: 1px solid transparent; transition: all 0.15s;
}
.cal-month-cell .cell-title, .cal-year-cell .cell-title { font-size: 13px; color: #333; }
.cal-month-cell .cell-profit, .cal-year-cell .cell-profit { font-size: 13px; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-month-cell.profit .cell-profit, .cal-year-cell.profit .cell-profit { color: #f5222d; }
.cal-month-cell.loss .cell-profit, .cal-year-cell.loss .cell-profit { color: #10b981; }
.cal-month-cell.zero .cell-profit, .cal-year-cell.zero .cell-profit { color: #8c90a3; }
.cal-month-cell.selected .cell-inner, .cal-year-cell.selected .cell-inner { border-color: #1677ff; background: #e6f4ff; }
.cal-month-cell.empty .cell-inner, .cal-year-cell.empty .cell-inner { background: transparent; cursor: default; }
/* 日历工具条: 左 日/月/年, 右 月份导航 + 金额/收益率 */
.cal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.cal-toolbar .cal-mode-tabs {
  margin-bottom: 0;
  flex-shrink: 0;
}
.cal-toolbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
}
.cal-toolbar-right .cal-grid-head {
  padding: 0;
}
.cal-view-toggle {
  display: flex;
  background: #eef1f6;
  border-radius: 8px;
  padding: 2px;
  flex-shrink: 0;
}
.cal-view-toggle span {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  color: #666;
  cursor: pointer;
  user-select: none;
}
.cal-view-toggle span.active {
  background: #fff;
  color: #1677ff;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(20, 26, 69, 0.08);
}
.cal-list-header { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 10px; }
.cal-list-title { font-size: 14px; font-weight: 600; color: #141a45; }
.cal-sort { display: flex; background: #eef1f6; border-radius: 999px; padding: 2px; }
.cal-sort span { padding: 4px 12px; font-size: 12px; color: #555; border-radius: 999px; cursor: pointer; user-select: none; }
.cal-sort span.active { background: #fff; color: #1677ff; font-weight: 600; }
.cal-fund-list { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 4px rgba(20, 26, 69, 0.06); }
.cal-fund-item { display: flex; align-items: center; padding: 12px; border-bottom: 1px solid #f0f2f6; cursor: pointer; }
.cal-fund-item:last-child { border-bottom: none; }
.cal-fund-info { flex: 1; min-width: 0; }
.cal-fund-name { font-size: 13px; color: #141a45; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-fund-code { font-size: 11px; color: #8c90a3; margin-top: 2px; }
.cal-fund-profit { text-align: right; }
.cal-fund-profit .num { font-size: 14px; font-weight: 600; }
.cal-fund-profit .rate { font-size: 11px; margin-top: 2px; }
.cal-fund-profit .num.up, .cal-fund-profit .rate.up { color: #f5222d; }
.cal-fund-profit .num.down, .cal-fund-profit .rate.down { color: #10b981; }
.cal-fund-empty { padding: 30px 0; text-align: center; font-size: 13px; color: #8c90a3; }
.cal-loading { padding: 24px 0; text-align: center; font-size: 13px; color: #8c90a3; }

/* ===================== 持仓汇总(分组标签最左侧"汇总"标签的内容) ===================== */
/* "持仓汇总"标签: 在分组标签栏中突出显示 */
.group-tab-summary { background: #fff7e6; color: #d48806; font-weight: 600; border: 1px solid #ffe7ba; }
.group-tab-summary.active { background: #fff7e6; color: #d48806; border-color: #ffc53d; }
/* 与持仓/自选基金列表同一套卡片样式(白色大圆角卡片 + 行分隔线, 暗色适配) */
.group-summary-body {
  background: var(--ui-card);
  border-radius: 16px;
  box-shadow: var(--ui-shadow);
  overflow: hidden;
  margin: 4px 14px 14px;
  padding: 0;
}
.gs-row { display: flex; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--ui-line); font-size: 14px; }
.gs-row:last-child { border-bottom: none; }
.gs-head-row { color: #8c90a3; font-size: 13px; padding: 8px 18px; border-bottom: 1px solid var(--ui-line); }
.gs-name { flex: 1; min-width: 0; color: #333; display: flex; align-items: center; white-space: normal; word-break: break-all; }
/* 分组名可换行完整显示, 不折叠 */
.gs-name-text { white-space: normal; word-break: break-all; min-width: 0; }
/* 分组持有的基金数量标签, 永不折叠 */
.gs-count-tag {
  display: inline-block; margin-left: 6px; padding: 1px 7px;
  font-size: 11px; font-weight: 500; color: #1677ff;
  background: rgba(22, 119, 255, 0.1); border-radius: 999px;
  vertical-align: middle; line-height: 1.6; flex-shrink: 0; white-space: nowrap;
}
.gs-asset { width: 18%; flex-shrink: 0; text-align: right; color: #141a45; }
.gs-hold { width: 27%; flex-shrink: 0; text-align: right; }
.gs-day { width: 27%; flex-shrink: 0; text-align: right; }
.gs-val { display: block; font-weight: 500; }
.gs-rate { display: block; font-size: 11px; opacity: 0.7; }
.gs-row .up { color: #f5222d; }
.gs-row .down { color: #10b981; }

/* ===================== 行情页 / 美股夜盘 ===================== */
.market-content { padding: 12px; }
.market-entry-card {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, #1f4e79, #2b3a67); color: #fff;
  border-radius: 14px; padding: 18px 18px; cursor: pointer;
  box-shadow: 0 4px 12px rgba(31, 78, 121, 0.25);
}
.market-entry-text { display: flex; flex-direction: column; gap: 4px; }
.market-entry-title { font-size: 17px; font-weight: 700; }
.market-entry-sub { font-size: 12px; color: rgba(255, 255, 255, 0.75); }
.market-entry-arrow { font-size: 26px; color: rgba(255, 255, 255, 0.85); }
.us-night-content { padding: 12px 12px 116px; }
.us-index-row { display: flex; gap: 8px; margin-bottom: 16px; }
.us-index-card {
  flex: 1; background: #fff; border-radius: 12px; padding: 12px 6px; text-align: center;
  box-shadow: 0 1px 4px rgba(20, 26, 69, 0.06);
}
.us-index-name { font-size: 12px; color: #8c90a3; }
.us-index-price { font-size: 15px; font-weight: 700; color: #141a45; margin-top: 4px; white-space: nowrap; }
.us-index-chg { font-size: 12px; margin-top: 3px; }
.us-index-chg.up { color: #f5222d; }
.us-index-chg.down { color: #10b981; }
.us-list-title { font-size: 14px; font-weight: 600; color: #141a45; margin-bottom: 8px; }
.us-list-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.us-list-update { font-size: 11px; color: #8c90a3; }
.us-source-tag { display: inline-block; padding: 0 5px; border-radius: 4px; background: #eef1f6; color: #555; font-size: 10px; }
.qdii-item { display: flex; align-items: center; padding: 12px; border-bottom: 1px solid #f0f2f6; cursor: pointer; }
.qdii-item:last-child { border-bottom: none; }
.qdii-detail { background: #f7f9fc; border-top: 1px solid #f0f2f6; }
.qdii-detail-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; font-size: 13px; font-weight: 600; color: #141a45; border-bottom: 1px solid #eef1f6; }
.us-stock-list { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 4px rgba(20, 26, 69, 0.06); }
.us-stock-item { display: flex; align-items: center; padding: 12px; border-bottom: 1px solid #f0f2f6; }
.us-stock-item:last-child { border-bottom: none; }
.us-stock-info { flex: 1; min-width: 0; }
.us-stock-name { font-size: 13px; color: #141a45; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.us-stock-code { font-size: 11px; color: #8c90a3; margin-top: 2px; }
.us-stock-quote { text-align: right; }
.us-stock-price { font-size: 14px; font-weight: 600; color: #141a45; }
.us-stock-chg { font-size: 12px; margin-top: 2px; }
.us-stock-chg.up { color: #f5222d; }
.us-stock-chg.down { color: #10b981; }
.us-empty { padding: 30px 0; text-align: center; font-size: 13px; color: #8c90a3; }

/* QDII 夜盘列表表头(排序) */
.us-table-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 12px; font-size: 12px; color: #8c90a3;
}
.us-th-name { flex: 1; min-width: 0; }
.us-th-chg {
  flex-shrink: 0; cursor: pointer; user-select: none;
  display: inline-flex; align-items: center; gap: 3px;
}
.us-th-chg:active { opacity: 0.7; }
#usSortArrow { font-size: 12px; line-height: 1; }

/* ===================== 基金搜索框(行情页) ===================== */
.fund-search-box { position: relative; margin-bottom: 1px; }
.fund-search-input {
  width: 100%; box-sizing: border-box;
  padding: 10px 14px; font-size: 12px; color: #141a45;
  border: 1px solid #d9d9d9; border-radius: 10px; outline: none;
  background: #fff;
}
.fund-search-input:focus { border-color: #1677ff; }
.fund-search-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px);
  background: #fff; border-radius: 10px; box-shadow: 0 6px 20px rgba(20, 26, 69, 0.12);
  z-index: 30; max-height: 320px; overflow-y: auto;
}
.fs-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-bottom: 1px solid #f0f2f6; gap: 8px;
}
.fs-item:last-child { border-bottom: none; }
.fs-info { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; cursor: pointer; }
.fs-item .fs-info:hover { background: var(--ui-bg-soft, #f5f7fb); border-radius: 8px; }
.fs-item .fs-info:active { background: var(--ui-bg, #f0f2f6); }
.fs-name { font-size: 13px; color: #141a45; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 62%; }
.fs-code { font-size: 11px; color: #8c90a3; }
.fs-type { font-size: 10px; color: #8c90a3; background: #eef1f6; border-radius: 4px; padding: 1px 5px; }
.fs-actions { display: flex; gap: 6px; flex-shrink: 0; }
.fs-btn {
  border: none; border-radius: 6px; padding: 5px 10px; font-size: 12px; cursor: pointer;
}
.fs-add { background: #1677ff; color: #fff; }
.fs-add:active { opacity: 0.85; }
.fs-zx { background: #eef1f6; color: #333; }
.fs-zx:active { opacity: 0.85; }
.fs-empty { padding: 20px 12px; text-align: center; font-size: 13px; color: #8c90a3; }

/* ===================== 添加弹窗代码自动匹配下拉 ===================== */
.fund-code-wrap { position: relative; flex: 1; }
.fund-suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 2px);
  background: #fff; border: 1px solid #e5e7eb; border-radius: 8px;
  box-shadow: 0 6px 20px rgba(20, 26, 69, 0.12);
  z-index: 40; max-height: 240px; overflow-y: auto;
}
.fs-suggest-item { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; cursor: pointer; border-bottom: 1px solid #f7f8fa; }
.fs-suggest-item:last-child { border-bottom: none; }
.fs-suggest-item:active { background: #f5f7fa; }
.fs-suggest-name { font-size: 13px; color: #141a45; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-right: 8px; }
.fs-suggest-code { font-size: 11px; color: #8c90a3; flex-shrink: 0; }

/* ===================== 定投 ===================== */
/* 定投标记(持仓/自选页) */
.plan-badge {
  display: inline-block; vertical-align: 1px;
  font-size: 10px;font-weight: 500; color: #1677ff; background: #e8f1ff;
  border-radius: 4px; padding: 0 2px; margin-left: 5px; line-height: 16px;
}

/* 我的页菜单 */
.profile-menu { padding: 12px 14px; }
.profile-menu-item {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border-radius: 12px; padding: 16px 14px;
  box-shadow: 0 2px 8px rgba(20, 26, 69, 0.06); cursor: pointer;
}
.profile-menu-item:active { opacity: 0.85; }
.profile-menu-icon { width: 34px; height: 34px; border-radius: 10px; background: #e8f1ff; color: #1677ff; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.profile-menu-text { flex: 1; font-size: 15px; color: #141a45; font-weight: 600; }
.profile-menu-arrow { font-size: 18px; color: #c4c8d6; }
.profile-menu-item + .profile-menu-item { margin-top: 10px; }

/* 账户信息页 */
.account-form { padding: 16px 14px; }
.account-form .form-item { margin-bottom: 14px; }
.account-form .form-item label { display: block; font-size: 13px; color: #8c90a3; margin-bottom: 6px; }
.account-phone { font-size: 15px; color: #141a45; font-weight: 600; }
.form-divider { height: 1px; background: #f0f0f0; margin: 16px 0; }

/* 偏好设置页 */
.pref-tip { padding: 12px 16px 0; font-size: 12px; color: #8c90a3; }
.pref-list { padding: 12px 14px; }
.pref-item {
  display: flex; align-items: center; justify-content: space-between;
  background: #fff; border-radius: 12px; padding: 16px 14px; margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(20, 26, 69, 0.06);
}
.pref-item-label { font-size: 15px; color: #141a45; font-weight: 600; }
.pref-switch {
  position: relative; width: 46px; height: 26px; border-radius: 13px;
  background: #d9d9d9; cursor: pointer; transition: background 0.2s; flex-shrink: 0;
}
.pref-switch::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: #fff; transition: left 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.pref-switch.on { background: #1677ff; }
.pref-switch.on::after { left: 23px; }

/* 眼睛按钮(区域金额隐藏) */
.eye-btn {
  border: none; background: #f2f4f8; border-radius: 50%;
  width: 30px; height: 30px; font-size: 15px; line-height: 1;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  color: #141a45; opacity: 0.75; flex-shrink: 0; padding: 0;
}
.eye-btn.off { opacity: 0.35; background: #e4e6eb; }
/* 收益日历"当日总收益"后的眼睛: 纯线条图标, 无底色, 白色线条(适配深蓝渐变卡片) */
.cal-sum-label .cal-sum-eye {
  width: 18px; height: 18px; background: transparent; color: #5a6072; opacity: 0.85;
  vertical-align: -2px;
}
.cal-sum-label .cal-sum-eye svg { width: 16px; height: 16px; }
.cal-sum-label .cal-sum-eye.off { background: transparent; opacity: 0.3; }
/* 汇总栏"总持仓金额"后的眼睛: 纯线条图标, 无底色 */
.summary-label .summary-eye {
  width: 20px; height: 20px; background: transparent; opacity: 0.8;
  margin-left: 4px; vertical-align: -3px;
}
.summary-label .summary-eye svg { width: 16px; height: 16px; }
.summary-label .summary-eye.off { background: transparent; opacity: 0.3; }

/* 定投计划列表 */
.fixed-plan-list { padding: 12px 14px; }
.plan-card {
  background: #fff; border-radius: 12px; padding: 14px;
  margin-bottom: 12px; box-shadow: 0 2px 8px rgba(20, 26, 69, 0.06);
}
.plan-card-active { border: 1.5px solid #1677ff; box-shadow: 0 2px 10px rgba(22, 119, 255, 0.15); }
.plan-card-top { display: flex; align-items: center; justify-content: space-between; }
.plan-name { font-size: 15px; font-weight: 600; color: #141a45; }
.plan-code { font-size: 12px; color: #8c90a3; font-weight: 400; margin-left: 6px; }
.plan-status { font-size: 11px; padding: 2px 8px; border-radius: 10px; }
.plan-on { color: #1677ff; background: #e8f1ff; }
.plan-off { color: #8c90a3; background: #eef1f6; }
.plan-card-mid { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.plan-amount { font-size: 17px; font-weight: 700; color: #141a45; }
.plan-freq { font-size: 12px; color: #6b7192; background: #f4f6fa; border-radius: 6px; padding: 2px 8px; }
.plan-next { font-size: 12px; color: #8c90a3; }
.plan-card-actions { display: flex; gap: 8px; }
.plan-act {
  flex: 1; text-align: center; font-size: 12px; color: #1677ff;
  background: #f4f8ff; border-radius: 6px; padding: 6px 0; cursor: pointer;
}
.plan-act:active { opacity: 0.8; }
.plan-act.danger { color: #e5484d; background: #fdf0f0; }

/* 定投弹窗: 频率/周几 选择 */
.plan-freq-group { display: flex; background: #eef1f6; border-radius: 8px; padding: 2px; }
.plan-freq-group span { flex: 1; text-align: center; font-size: 13px; padding: 6px 0; border-radius: 6px; color: #666; cursor: pointer; }
.plan-freq-group span.active { background: #fff; color: #1677ff; font-weight: 600; box-shadow: 0 1px 3px rgba(20, 26, 69, 0.1); }
.plan-dow-group { display: flex; gap: 6px; flex-wrap: wrap; }
.plan-dow-group span {
  width: 40px; text-align: center; font-size: 13px; padding: 6px 0;
  background: #f4f6fa; border-radius: 8px; color: #6b7192; cursor: pointer;
}
.plan-dow-group span.active { background: #1677ff; color: #fff; font-weight: 600; }
.plan-select {
  width: 100%; border: 1px solid #e5e7eb; border-radius: 8px;
  padding: 9px 10px; font-size: 14px; color: #141a45; background: #fff;
}

/* 定投记录弹窗 */
#planLogBack {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  font-size: 13px; color: #1677ff; background: none; border: none; cursor: pointer; padding: 4px 6px;
}
.plan-log-title { font-size: 13px; font-weight: 600; color: #6b7192; margin-bottom: 4px; }
.plan-log-item { padding: 10px 0; border-bottom: 1px solid #f2f4f8; }
.plan-log-item:last-child { border-bottom: none; }
.plan-log-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.plan-log-date { font-size: 13px; font-weight: 600; color: #141a45; }
.plan-log-status { font-size: 11px; padding: 2px 8px; border-radius: 10px; }
.log-status-done { color: #16a34a; background: #e8f8ef; }
.log-status-wait { color: #d97706; background: #fdf3e3; }
.plan-log-row { font-size: 12px; color: #6b7192; }

/* ===================== 夜间主题(灰黑) ===================== */
body.dark { background: #141416; color: #d6d8de; }
body.dark #mainApp { background: #141416; }
body.dark .page-header { background: #1c1c20; border-bottom: 1px solid #2a2a30; }
body.dark .page-header h2 { color: #e6e8ee; }
body.dark .bottom-nav { background: #1c1c20; border-top: 1px solid #2a2a30; }
body.dark .nav-item { color: #8a8d99; }
body.dark .nav-item.active { color: #4c9aff; }
body.dark .fund-summary-bar { background: #1c1c20; border-bottom: 1px solid #2a2a30; }
body.dark .summary-label { color: #8a8d99; }
body.dark .summary-value { color: #e6e8ee; }
body.dark .summary-time { color: #7c7f8c; }
body.dark .group-tab-bar { background: #1c1c20; }
body.dark .group-tab-item, body.dark .zx-group-tab-item, body.dark .cal-group-tab { color: #9a9daa; }
body.dark .group-tab-item.active, body.dark .zx-group-tab-item.active, body.dark .cal-group-tab.active { color: #4c9aff; }
body.dark .fund-list-header { background: #1c1c20; color: #9a9daa; border-bottom: 1px solid #2a2a30; }
body.dark .fund-item { background: #222226; box-shadow: 0 1px 4px rgba(0,0,0,0.3); }
body.dark .fund-item .name, body.dark .total-profit-num, body.dark .day-profit-num, body.dark .price { color: #e6e8ee; }
body.dark .fund-item .sub, body.dark .fund-code-cell, body.dark .net-date { color: #8a8d99; }
body.dark .fund-list-body .loading { color: #8a8d99; }
body.dark .profile-menu-item, body.dark .pref-item, body.dark .plan-card { background: #222226; box-shadow: 0 1px 4px rgba(0,0,0,0.3); }
body.dark .profile-menu-text, body.dark .pref-item-label, body.dark .plan-card, body.dark .plan-card * { color: #e6e8ee; }
body.dark .profile-menu-arrow { color: #5a5d6a; }
body.dark .account-form label, body.dark .form-item label { color: #8a8d99; }
body.dark .account-phone { color: #e6e8ee; }
body.dark .group-select, body.dark .fund-search-input, body.dark .plan-select { background: #2a2a30; color: #e6e8ee; border-color: #33333a; }
body.dark .cal-summary-card { background: #222226; }
body.dark .cal-sum-label, body.dark .cal-sum-sub-item .lbl { color: #8a8d99; }
body.dark .cal-sum-value, body.dark .cal-sum-sub-item .val { color: #e6e8ee; }
body.dark .cal-mode-tabs { background: #2a2a30; }
body.dark .cal-mode-tab { color: #9a9daa; }
body.dark .cal-mode-tab.active { color: #e6e8ee; }
body.dark .cal-grid-head, body.dark .cal-view-toggle span { color: #9a9daa; }
body.dark .cal-date-cell .cell-inner, body.dark .cal-month-cell, body.dark .cal-year-cell { background: #222226; }
body.dark .cal-date-cell .cell-day, body.dark .cell-title { color: #d6d8de; }
body.dark .cell-profit { color: #9a9daa; }
body.dark .modal-container { background: #1c1c20; }
body.dark .modal-header { border-bottom: 1px solid #2a2a30; }
body.dark .modal-header h3 { color: #e6e8ee; }
body.dark .text-btn { color: #9a9daa; }
body.dark .us-index-card { background: #222226; }
body.dark .us-index-name, body.dark .us-index-price { color: #e6e8ee; }
body.dark .us-list-title, body.dark .us-list-update { color: #9a9daa; }
body.dark .us-table-head { background: #1c1c20; color: #9a9daa; }
body.dark .qdii-item { background: #222226; }
body.dark .us-stock-name { color: #e6e8ee; }
body.dark .us-stock-code { color: #8a8d99; }
body.dark .pref-tip { color: #8a8d99; }
body.dark .eye-btn { background: #2a2a30; color: #d6d8de; }
body.dark .eye-btn.off { background: #33333a; opacity: 0.45; }
body.dark .gs-row { color: #d6d8de; border-bottom-color: #23262f; }
body.dark .gs-head-row { color: #8b92a3; border-bottom-color: #23262f; }
body.dark .gs-name, body.dark .gs-asset { color: #e7e9f0; }
body.dark .gs-count-tag { color: #4d9fff; background: rgba(77, 159, 255, 0.14); }
body.dark .cal-fund-item { background: #222226; }
body.dark .cal-fund-name { color: #e6e8ee; }
body.dark .cal-fund-code { color: #8a8d99; }
body.dark .fund-pending { color: #e0a84e; }
body.dark .time-slot-radio .radio-label { color: #d6d8de; }
body.dark .fee-row input[type="number"] { background: #2a2a30; color: #e6e8ee; border-color: #33333a; }
body.dark .fee-est { color: #e0a84e; }

/* ===================== 窄屏标签字号统一(与【已更新】一致 10px) ===================== */
@media (max-width: 767px) {
  .updated-tag,
  .plan-badge,
  .group-tag,
  .fund-group-tag,
  .zx-note-badge {
    font-size: 10px;
  }
}

/* =========================================================
   UI 2.0 · 简约重设计覆盖层
   置于文件末尾统一覆盖旧视觉; 类名保持不变, 功能零改动
   ========================================================= */
:root {
  --ui-bg: #f6f7fb;              /* 页面底色(带蓝调浅灰) */
  --ui-card: #ffffff;            /* 卡片底色 */
  --ui-text: #1c2438;            /* 主文字 */
  --ui-text-2: #5b6478;          /* 次级文字 */
  --ui-text-3: #9aa3b5;          /* 弱化文字 */
  --ui-line: #eef0f5;            /* 分隔线 */
  --ui-line-2: #e4e7ee;          /* 强分隔线 */
  --ui-primary: #3b6cf6;         /* 主色 */
  --ui-primary-soft: #eaf0fe;    /* 主色浅底 */
  --ui-rise: #e03131;            /* 涨(红) */
  --ui-fall: #0ca678;            /* 跌(绿) */
  --ui-radius: 14px;             /* 卡片圆角 */
  --ui-radius-sm: 10px;
  --ui-shadow: 0 1px 2px rgba(23, 32, 58, 0.04), 0 6px 20px rgba(23, 32, 58, 0.05);
  --ui-shadow-hover: 0 2px 6px rgba(23, 32, 58, 0.06), 0 12px 28px rgba(23, 32, 58, 0.09);
}

/* ---------- 全局 ---------- */
body {
  background: var(--ui-bg);
  color: var(--ui-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font-family: inherit; }
body, button, input, select, textarea { font-feature-settings: "tnum"; }
input, select, textarea { transition: border-color .18s ease, box-shadow .18s ease, background .18s ease; }
input:focus, .group-select:focus, .plan-select:focus {
  border-color: var(--ui-primary) !important;
  box-shadow: 0 0 0 3px rgba(59, 108, 246, 0.12);
}

/* 涨跌色统一 */
.profit, .rise, .summary-value.profit, .rate.profit, .day-profit-num.profit,
.total-profit-num.profit, .total-rate.profit, .cell-profit.profit { color: var(--ui-rise) !important; }
.loss, .fall, .summary-value.loss, .rate.loss, .day-profit-num.loss,
.total-profit-num.loss, .total-rate.loss, .cell-profit.loss { color: var(--ui-fall) !important; }
.zero { color: var(--ui-text-3) !important; }
/* 详情页所有涨跌幅: +红-绿(统一色值, 与持仓页一致) */
.rise-text { color: var(--ui-rise) !important; }
.fall-text { color: var(--ui-fall) !important; }

/* ---------- 页面头部 ---------- */
.page-header {
  position: sticky; top: 0;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  padding: 14px 18px;
  border-bottom: 1px solid transparent;
  box-shadow: 0 1px 0 rgba(23, 32, 58, 0.03);
}
.page-header h2 { font-size: 19px; font-weight: 700; letter-spacing: .2px; color: var(--ui-text); }

/* 仅头部粘性, 摘要/分组栏/表头随内容滚动(简化层级, 更自然) */
.fund-summary-bar, .group-tab-bar, .fund-list-header { position: static; }

/* ---------- 底部导航 ---------- */
.bottom-nav {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-top: 1px solid var(--ui-line);
  box-shadow: 0 -4px 20px rgba(23, 32, 58, 0.05);
}
.nav-item { border-radius: 12px; margin: 6px 4px; transition: transform .15s ease, background .15s ease; }
.nav-item:active { transform: scale(.95); }
.nav-item.active .nav-icon { color: var(--ui-primary); }
.nav-item.active .nav-text { color: var(--ui-primary); font-weight: 600; }

/* ---------- 汇总栏 ---------- */
.fund-summary-bar {
  background: #eef4fd;   /* 浅蓝衬底(覆盖后部已生效块) */
  border-bottom: 1px solid #e0e9f9;
  padding: 14px 16px 12px;
}
.summary-label { font-size: 13px; color: var(--ui-text-2); font-weight: 500; }
.summary-value { font-size: 17px; font-weight: 700; letter-spacing: -.3px; }
.summary-time { font-size: 10px; color: var(--ui-text-3); display: inline; }

/* ---------- 分组标签栏 ---------- */
.group-tab-bar { background: transparent; padding: 10px 16px 6px; }
.group-tabs { gap: 8px; }
.group-tab-item, .zx-group-tab-item {
  padding: 2px 14px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--ui-text-2);
  background: #ffffff;
  border: 1px solid var(--ui-line);
  box-shadow: 0 1px 2px rgba(23, 32, 58, 0.03);
  transition: all .18s ease;
}
.group-tab-item.active, .zx-group-tab-item.active {
  background: var(--ui-primary);
  border-color: var(--ui-primary);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(59, 108, 246, 0.28);
}
.group-tab-item:hover, .zx-group-tab-item:hover { border-color: var(--ui-primary-soft); }

/* ---------- 列表表头 ---------- */
.fund-list-header {
  background: transparent;
  padding: 6px 28px;   /* 与行对齐: 列表卡片边距14px + 行内边距14px = 28px */
  color: var(--ui-text-3);
  font-size: 12px;
  font-weight: 500;
  border-bottom: 1px solid var(--ui-line);
}
.fund-list-header .sortable-th { cursor: pointer; }
/* 表头列文字对齐与数据列一致(名称列左对齐, 数值/日期列右对齐), 否则宽屏下明显错位 */
.fund-list-header .col-name,
.fund-list-header .col-note { text-align: left; align-items: flex-start; }
.fund-list-header .col-value,
.fund-list-header .col-day-profit,
.fund-list-header .col-total-profit { text-align: right; align-items: flex-end; }
/* 表头右侧"自定义数据列"齿轮按钮 */
.col-config-btn {
  border: none; background: transparent; color: var(--ui-text-2);
  width: 26px; height: 26px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.col-config-btn svg { width: 16px; height: 16px; }
.col-config-btn:active { opacity: .6; }
/* 自定义数据列弹窗选项 */
.col-config-item { padding: 9px 2px; font-size: 14px; color: var(--ui-text); display: flex; align-items: center; }
.col-config-item input { width: 16px; height: 16px; margin-right: 8px; accent-color: var(--ui-primary, #1677ff); }

/* ---------- 持仓/自选列表行 (收益日历明细同款: 整体大卡片 + 行分隔线, 非独立胶囊卡片) ---------- */
/* 今日买入待确认卡片(无持仓的待确认买入, 等净值入账) */
#pendingBuyList {
  margin: 4px 14px 0;
}
.pbu-list {
  background: var(--ui-card);
  border: 1px dashed var(--ui-primary-soft, #a8c4ff);
  border-radius: 14px;
  box-shadow: var(--ui-shadow);
  padding: 4px 14px;
}
.pbu-head { display: flex; align-items: center; gap: 6px; padding: 8px 0 4px; }
.pbu-head .pbu-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ui-primary, #1677ff); flex-shrink: 0; animation: pbu-blink 1.4s infinite; }
@keyframes pbu-blink { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.pbu-head .pbu-tip { font-size: 12px; font-weight: 600; color: var(--ui-primary, #1677ff); }
.pbu-item { display: flex; flex-direction: column; gap: 3px; padding: 8px 0; border-bottom: 1px solid var(--ui-line); }
.pbu-item:last-child { border-bottom: none; padding-bottom: 10px; }
.pbu-line1 { display: flex; align-items: baseline; gap: 6px; }
.pbu-name { font-size: 13px; font-weight: 500; color: var(--ui-text); }
.pbu-code { font-size: 11px; color: var(--ui-text-3); }
.pbu-sub { font-size: 11px; color: var(--ui-text-3); line-height: 1.5; }
/* 待确认"今日买入"虚拟持仓行: 列表内"待确认"小标 + 行内"买入待确认"徽标 */
.pending-buy-item { opacity: .92; }
.pending-buy-item .pbu-tag {
  display: inline-block; font-size: 10px; color: var(--ui-primary, #1677ff);
  background: var(--ui-primary-soft, #e6f0ff); border-radius: 4px; padding: 1px 5px;
}
.pending-buy-tag {
  color: var(--ui-primary, #1677ff) !important;
  background: var(--ui-primary-soft, #e6f0ff) !important;
  font-weight: 500;
}

.fund-list-body {
  background: var(--ui-card);
  border-radius: 16px;
  box-shadow: var(--ui-shadow);
  overflow: hidden;
  margin: 4px 14px 14px;
  padding: 0;
}
.fund-item {
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  margin-bottom: 0;
  border: none;
  border-bottom: 1px solid var(--ui-line);
  padding: 14px;
  transition: background .12s ease;
}
.fund-item:last-child { border-bottom: none; }
.fund-item:active { background: var(--ui-bg); }
.fund-name-info .name { font-size: 13px; font-weight: 550; color: var(--ui-text); line-height: 1.4; }
.fund-name-info .sub { font-size: 11px; color: var(--ui-text-3); margin-top: 4px; gap: 6px; }
.fund-code-cell, .fund-hold-cell { letter-spacing: .2px; }
/* 每行胶囊第一排数字: 14.5px 500, 右对齐+等宽
   注意: 列容器 .col 是 flex column + align-items:center, 需用 flex-end 覆盖居中才能右对齐 */
.fund-value-info, .fund-day-profit, .fund-total-profit { align-items: flex-end; }
.fund-value-info .rate,
.fund-day-profit .day-profit-num,
.fund-total-profit .total-profit-num { font-size: 14.5px; font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.fund-value-info .price,
.fund-day-profit .net-date,
.fund-total-profit .total-rate { font-size: 13px; font-weight: 400; color: var(--ui-text-3); margin-top: 3px; text-align: right; font-variant-numeric: tabular-nums; }
.action-btn {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--ui-bg); color: var(--ui-text-2);
  font-size: 18px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s ease, transform .15s ease;
}
.action-btn:active { background: var(--ui-line-2); transform: scale(.9); }

/* 列表标签统一质感 */
.updated-tag {
  background: var(--ui-primary-soft); color: var(--ui-primary);
  border-radius: 4px; font-size: 10px; padding: 1px 5px;
}
.plan-badge {
  color: var(--ui-primary);background: var(--ui-primary-soft);; border-radius: 4px;
}
.group-tag {
  color: var(--ui-primary); background: var(--ui-primary-soft);
  border-radius: 6px; font-weight: 600;
}
/* 基金列表: 分组首字标签(独立类, 完整样式与通用 .group-tag 一致) */
.fund-group-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  line-height: 1;
  font-size: 10px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);   /* 文字透明 0.95 */
  background: var(--ui-primary-soft);
  border-radius: 3px;
  margin-right: 6px;
  vertical-align: middle;
  white-space: nowrap;
  opacity: 0.8;   /* 透明 0.8 */
}
/* 列表标签统一: 已更新/定投/笔记 样式一致(10px), 与名称同高且同一条横向线 */
.updated-tag, .plan-badge, .zx-note-badge {
  display: inline-block;
  flex-shrink: 0;
  vertical-align: middle;
  background: var(--ui-primary-soft);
  color: var(--ui-primary);
  border: none;
  border-radius: 4px;
  font-size: 10px;
  line-height: 1.5;
  padding: 1px 5px;
  white-space: nowrap;
}

/* 待确认/笔记行 */
.fund-pending { font-size: 10px; color: #e8890c; background: #fff7e6; border-radius: 6px; padding: 0px 0px; display: inline-block; margin-top: 5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.zx-note { margin-top: 5px; font-size: 11px; color: var(--ui-text-3); }

/* ---------- 持仓汇总(分组汇总) ---------- */
.group-summary-body { padding: 0; }

/* ---------- 搜索框 ---------- */
.fund-search-box { padding: 4px 16px 2px; }
.fund-search-input {
  border-radius: var(--ui-radius-sm);
  border: 1px solid var(--ui-line-2);
  background: #fff;
  padding: 10.5px 14px;
  font-size: 13.3px;
}
.fund-search-results { border-radius: var(--ui-radius-sm); box-shadow: var(--ui-shadow-hover); border: 1px solid var(--ui-line); }

/* ---------- 按钮 ---------- */
.primary-btn {
  background: linear-gradient(135deg, #4d7cff, #3b6cf6);
  border-radius: var(--ui-radius-sm);
  box-shadow: 0 4px 14px rgba(59, 108, 246, 0.28);
  transition: transform .15s ease, box-shadow .2s ease, opacity .15s ease;
  font-weight: 600;
}
.primary-btn:hover { background: linear-gradient(135deg, #5c88ff, #4577fa); box-shadow: 0 6px 18px rgba(59, 108, 246, 0.34); }
.primary-btn:active { transform: scale(.97); }
.primary-btn.small { padding: 7px 14px; font-size: 13px; border-radius: 8px; }
.cancel-btn { border-radius: var(--ui-radius-sm); border: 1px solid var(--ui-line-2); background: #fff; color: var(--ui-text-2); font-weight: 500; transition: all .15s ease; }
.cancel-btn:active { transform: scale(.97); }
.text-btn { color: var(--ui-primary); font-weight: 500; border-radius: 8px; }
/* 分组管理按钮 */
.group-manage-btn { font-size: 12px; padding: 4px 8px; flex-shrink: 0; }

/* ---------- 弹窗 ---------- */
.modal-mask { backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); background: rgba(20, 24, 34, 0.42); }
.modal-container {
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 48px rgba(23, 32, 58, 0.18);
  overflow: hidden;
  animation: ui-modal-in .22s ease;
}
@keyframes ui-modal-in {
  from { opacity: 0; transform: translateY(14px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-header { padding: 18px 20px 12px; border-bottom: 1px solid var(--ui-line); }
.modal-header h3 { font-size: 17px; font-weight: 700; }
.modal-body { padding: 18px 20px; overflow-y: auto; max-height: calc(80vh - 120px); }
/* 弹窗顶部基金信息条(编辑/加仓/减仓/移动/笔记等) */
.modal-fundinfo {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  background: var(--ui-primary-soft, #eaf1ff);
  border-radius: 8px; padding: 7px 10px; margin-bottom: 14px;
  font-size: 13px; font-weight: 500; color: var(--ui-text);
}
.modal-fundinfo .mfi-code { font-size: 11px; color: var(--ui-text-3); font-weight: 400; }
.modal-fundinfo.mfi-batch { font-size: 12px; color: var(--ui-text-2); background: var(--ui-bg, #f5f7fa); }
.modal-footer { padding: 12px 20px 18px; border-top: 1px solid var(--ui-line); gap: 10px; }
.close-btn { width: 28px; height: 28px; border-radius: 50%; color: var(--ui-text-3); font-size: 18px; transition: background .15s ease; }
.close-btn:active { background: var(--ui-line); }

/* ---------- 通用确认/提示弹窗(替代原生 confirm/alert) ---------- */
.dialog-mask {
  position: fixed; inset: 0; background: rgba(20, 24, 34, 0.42);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1200; padding: 20px;
}
.dialog-card { max-width: 320px; }
.dialog-msg { font-size: 14px; color: var(--ui-text); line-height: 1.6; white-space: pre-wrap; word-break: break-all; margin: 0; }
.dialog-footer { display: flex; justify-content: flex-end; }
.dialog-btn {
  border: none; border-radius: var(--ui-radius-sm); padding: 9px 18px;
  font-size: 14px; cursor: pointer; transition: transform .15s ease, opacity .15s ease;
}
.dialog-btn:active { transform: scale(.96); }
.dialog-cancel { background: #fff; border: 1px solid var(--ui-line-2); color: var(--ui-text-2); font-weight: 500; }
.dialog-primary { background: linear-gradient(135deg, #4d7cff, #3b6cf6); color: #fff; font-weight: 600; box-shadow: 0 4px 14px rgba(59, 108, 246, 0.28); }
.dialog-primary.danger { background: linear-gradient(135deg, #ff6b6e, #f5222d); box-shadow: 0 4px 14px rgba(245, 34, 45, 0.28); }
.dlg-close { width: 28px; height: 28px; border-radius: 50%; background: transparent; border: none; color: var(--ui-text-3); font-size: 18px; line-height: 1; cursor: pointer; }
.dlg-close:active { background: var(--ui-line); }
body.dark .dialog-cancel { background: #23262f; border-color: #2e323d; color: #a6adbd; }
.prompt-input {
  width: 100%; margin-top: 14px; box-sizing: border-box;
  border: 1px solid var(--ui-line-2); border-radius: 10px;
  padding: 10px 12px; font-size: 14px; color: var(--ui-text);
  background: var(--ui-bg); transition: border-color .15s ease;
}
.prompt-input:focus { outline: none; border-color: var(--ui-primary); }
body.dark .prompt-input { background: #23262f; color: #e6e8ee; }

/* 表单 */
.form-item { margin-bottom: 16px; }
.form-item label { font-size: 13px; color: var(--ui-text-2); font-weight: 500; margin-bottom: 6px; display: block; }
.form-item input, .form-item textarea { border-radius: 10px; border-color: var(--ui-line-2); }
.form-desc { font-size: 11px; color: var(--ui-text-3); line-height: 1.6; }

/* 搜索下拉/基金建议 */
.fund-suggest { border-radius: 12px; box-shadow: var(--ui-shadow-hover); border: 1px solid var(--ui-line); overflow: hidden; background: #fff; }
.fs-item { padding: 11px 14px; transition: background .12s ease; }
.fs-item:active { background: var(--ui-bg); }
.fs-name { font-size: 14px; font-weight: 600; }
.fs-code, .fs-type { font-size: 11px; color: var(--ui-text-3); }
.fs-empty { color: var(--ui-text-3); font-size: 13px; padding: 16px; text-align: center; }

/* 分组管理/移动分组 */
.group-list, .manage-group-list { padding: 0; }
.group-option, .manage-group-item { border-radius: 12px; background: var(--ui-bg); padding: 12px 14px; margin-bottom: 8px; transition: all .12s ease; }
.group-option.active, .manage-group-item.active { background: var(--ui-primary-soft); color: var(--ui-primary); }
.manage-group-actions button, .sort-handle { color: var(--ui-text-2); }

/* 交易记录 */
.log-item { border-radius: 12px; background: var(--ui-bg); padding: 12px 14px; margin-bottom: 8px; }
.log-type-add { color: var(--ui-rise); }
.log-type-reduce { color: var(--ui-fall); }
.log-status { border-radius: 999px; padding: 2px 10px; font-size: 11px; }
.log-status-cancel { color: #999; background: #f0f0f2; }
body.dark .log-status-cancel { color: #8a8d99; background: #2a2a30; }

/* 交易记录页/tradeLog: 基金名、撤销按钮、筛选tab */
.log-name { font-size: 12px; color: var(--ui-text); font-weight: 500; margin-left: auto; }
.log-code { margin-left: 4px; font-size: 10px; color: var(--ui-text-3); font-weight: 400; }
.log-cancel-row { margin-top: 8px; text-align: right; }
.log-cancel-btn {
  border: 1px solid var(--ui-fall, #f5222d); color: var(--ui-fall, #f5222d);
  background: rgba(245, 34, 45, 0.06); border-radius: 6px;
  padding: 3px 14px; font-size: 12px; cursor: pointer;
}
.log-cancel-btn:active { opacity: .7; }
.trade-log-filter { display: flex; gap: 8px; padding: 12px 16px 2px; }
.tl-tab {
  padding: 5px 16px; font-size: 12px; color: var(--ui-text-2);
  background: var(--ui-bg-2, #eef1f6); border-radius: 999px;
  cursor: pointer; user-select: none; transition: all .15s;
}
.tl-tab.active { background: var(--ui-primary, #1677ff); color: #fff; font-weight: 600; }
#tradeLogList {
  margin: 4px 14px 20px; padding: 0 14px;
  background: var(--ui-card); border-radius: 16px;
  box-shadow: var(--ui-shadow);
  min-height: calc(100vh - 230px);   /* 记录少时也铺满, 避免下方大面积留白 */
  max-height: calc(100vh - 230px);   /* 记录多时固定可视高度, 卡片内部滚动 */
  overflow-y: auto;
  display: flex; flex-direction: column;
}
/* 卡片内空态/加载态垂直居中 */
#tradeLogList > .loading { flex: 1; display: flex; align-items: center; justify-content: center; padding: 0; }
/* 交易记录页: 卡片内行(分隔线代替独立胶囊), 与持仓列表观感一致 */
#tradeLogList .log-item {
  background: transparent; border-radius: 0; margin-bottom: 0;
  padding: 12px 0; border-bottom: 1px solid var(--ui-line);
}
#tradeLogList .log-item:last-child { border-bottom: none; }
#tradeLogList .loading { background: transparent; padding: 30px 0; }

/* 笔记历史 */
.zx-note-history { max-height: 280px; overflow-y: auto; }
.zx-note-item { border-radius: 12px; background: var(--ui-bg); padding: 10px 12px; margin-bottom: 8px; font-size: 13px; }

/* 定投弹窗频率/周几选择 */
.plan-freq-group { border-radius: 12px; padding: 3px; }
.plan-dow-group span { border-radius: 10px; }

/* 眼按钮 */
.eye-btn { background: var(--ui-bg); color: var(--ui-text-2); border-radius: 50%; }

/* ---------- 上下文菜单 ---------- */
.context-menu {
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(23, 32, 58, 0.16);
  border: 1px solid var(--ui-line);
  padding: 6px;
  background: #fff;
  animation: ui-modal-in .16s ease;
}
.menu-item { border-radius: 9px; padding: 11px 14px; font-size: 14px; color: var(--ui-text); transition: background .12s ease; }
.menu-item:active { background: var(--ui-bg); }
.menu-item.danger { color: #e5484d; }

/* ---------- 详情页 ---------- */
.detail-content { padding: 14px 14px 110px; }
.detail-section {
  background: var(--ui-card);
  border-radius: var(--ui-radius);
  box-shadow: var(--ui-shadow);
  padding: 16px 16px 6px;
  margin-bottom: 14px;
  border: 1px solid rgba(23, 32, 58, 0.02);
}
.detail-section .section-title { font-size: 15px; font-weight: 700; color: var(--ui-text); margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--ui-line); }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; padding-bottom: 8px; }
/* 详情基金数据/持有明细: 4列2行 */
#fundDataGrid, #holdInfoGrid { grid-template-columns: repeat(4, 1fr) !important; }
.info-item { padding: 9px 4px; border-radius: 8px; transition: background .12s ease; }
.info-item:active { background: var(--ui-bg); }
.info-label { font-size: 12px; color: var(--ui-text-3); display: block; margin-bottom: 3px; }
.info-value { font-size: 13.5px; font-weight: 500; color: var(--ui-text); }
.info-value.rise { color: var(--ui-rise); }
.info-value.fall { color: var(--ui-fall); }

/* 趋势/图表 tabs */
.trend-tabs, .chart-tabs { gap: 6px; }
.trend-tab, .chart-tab {
  padding: 6px 14px; border-radius: 999px; font-size: 13px;
  color: var(--ui-text-2); background: var(--ui-bg); border: 1px solid transparent;
  transition: all .15s ease;
}
.trend-tab.active, .chart-tab.active { background: var(--ui-primary); color: #fff; font-weight: 600; box-shadow: 0 3px 10px rgba(59, 108, 246, 0.25); }
.trend-chart-panel { padding-top: 4px; }

/* 详情底部操作栏 */
.detail-action-bar {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-top: 1px solid var(--ui-line);
  padding: 10px 6px calc(10px + env(safe-area-inset-bottom));
  box-shadow: 0 -6px 24px rgba(23, 32, 58, 0.07);
}
.action-item { border-radius: 10px; padding: 6px 2px; transition: background .12s ease; }
.action-item:active { background: var(--ui-bg); }
.action-item .action-icon { font-size: 20px; display: flex; align-items: center; justify-content: center; line-height: 1; }
.action-item .action-icon svg { width: 20px; height: 20px; display: block; }
.action-item.danger .action-icon, .action-item.danger span { color: #e5484d; }

/* ---------- 表格 ---------- */
.table-wrap { border-radius: var(--ui-radius-sm); overflow: hidden; }
.data-table, .stock-table { border-collapse: collapse; width: 100%; font-size: 12px; }
.data-table th, .stock-table th {
  background: var(--ui-bg); color: var(--ui-text-2); font-weight: 600;
  padding: 10px 12px; text-align: left; font-size: 12px;
  border-bottom: 1px solid var(--ui-line-2);
}
.data-table td, .stock-table td { padding: 10px 1px; color: var(--ui-text); border-bottom: 1px solid var(--ui-line); }
.data-table tr:last-child td, .stock-table tr:last-child td { border-bottom: none; }
.data-table tbody tr, .stock-table tbody tr { transition: background .12s ease; }
.data-table tbody tr:active, .stock-table tbody tr:active { background: var(--ui-bg); }

/* ---------- 收益日历 ---------- */
.calendar-content { padding: 4px 14px 110px; }
.cal-summary-card {
  background: linear-gradient(135deg, #e2edfd, #d5e3fa);   /* 与持仓页浅蓝同款, 加深30% */
  border: 1px solid #d2e1f9;
  border-radius: 16px;
  box-shadow: var(--ui-shadow);
  padding: 14px 16px;
  margin: 8px 0 12px;
}
.cal-sum-main { text-align: center; padding-bottom: 12px; }
.cal-sum-label { font-size: 14px; color: #5a6072; }
.cal-sum-value { font-size: 32px; font-weight: 700; line-height: 1.3; color: #141a45; }
.cal-sum-value.up { color: #f5222d; }
.cal-sum-value.down { color: #10b981; }
.cal-sum-sub { display: flex; border-top: 1px solid rgba(20, 26, 69, 0.1); padding-top: 10px; }
.cal-sum-sub-item { flex: 1; text-align: center; }
.cal-sum-sub-item .lbl { display: block; font-size: 13px; color: #8c90a3; }
.cal-sum-sub-item .val { display: block; font-size: 16px; font-weight: 600; margin-top: 2px; color: #141a45; }
.cal-sum-sub-item .val.up { color: #f5222d; }
.cal-sum-sub-item .val.down { color: #10b981; }
.cal-mode-tabs { background: var(--ui-bg); border-radius: 999px; padding: 3px; }
.cal-mode-tab { border-radius: 999px; padding: 5px 16px; font-size: 13px; color: var(--ui-text-2); transition: all .15s ease; }
.cal-mode-tab.active { background: #fff; color: var(--ui-primary); font-weight: 600; box-shadow: 0 1px 4px rgba(23, 32, 58, 0.08); }
.cal-view-toggle { background: var(--ui-bg); border-radius: 999px; padding: 3px; }
.cal-view-toggle span { border-radius: 999px; padding: 5px 14px; font-size: 12px; transition: all .15s ease; }
.cal-view-toggle span.active { background: #fff; color: var(--ui-primary); font-weight: 600; box-shadow: 0 1px 4px rgba(23, 32, 58, 0.08); }
.cal-grid { background: var(--ui-card); border-radius: var(--ui-radius); box-shadow: var(--ui-shadow); padding: 10px; }
.cal-date-cell .cell-inner, .cal-month-cell, .cal-year-cell { border-radius: 10px; transition: transform .12s ease, background .12s ease; }
.cal-date-cell .cell-inner:active, .cal-month-cell:active, .cal-year-cell:active { transform: scale(.94); background: var(--ui-bg); }
.cal-list-header { margin: 18px 2px 8px; }
.cal-list-title { font-size: 14px; font-weight: 700; }
.cal-sort span { border-radius: 999px; padding: 4px 12px; font-size: 12px; transition: all .15s ease; }
.cal-sort span.active { background: var(--ui-primary-soft); color: var(--ui-primary); font-weight: 600; }

/* ---------- 行情/美股夜盘 ---------- */
.market-content { padding: 4px 14px 110px; }
.market-entry-card {
  background: linear-gradient(135deg, #1b2340, #26314f);
  border-radius: 18px;
  padding: 18px 20px;
  color: #fff;
  box-shadow: 0 10px 28px rgba(23, 32, 58, 0.28);
  transition: transform .15s ease, box-shadow .2s ease;
}
.market-entry-card:active { transform: scale(.98); }
.market-entry-title { font-size: 18px; font-weight: 700; letter-spacing: .3px; }
.market-entry-sub { font-size: 12px; opacity: .72; margin-top: 4px; }
.market-entry-arrow { font-size: 26px; color: rgba(255,255,255,0.85); }

.us-night-content { padding: 4px 14px 110px; }
.us-index-row { display: flex; gap: 10px; overflow-x: auto; padding: 4px 0 10px; }
.us-index-card {
  background: var(--ui-card);
  border-radius: 16px;
  box-shadow: var(--ui-shadow);
  padding: 14px 16px;
  min-width: 118px;
  border: 1px solid rgba(23, 32, 58, 0.02);
}
.us-list-head { margin: 6px 2px 8px; }
.us-list-title { font-size: 14px; font-weight: 700; }
.us-list-update { font-size: 11px; color: var(--ui-text-3); }
.us-table-head {
  background: var(--ui-card);
  border-radius: 12px;
  box-shadow: var(--ui-shadow);
  padding: 10px 14px;
  font-size: 12px;
  color: var(--ui-text-3);
  margin-bottom: 8px;
}
.qdii-item {
  background: var(--ui-card);
  border-radius: 14px;
  box-shadow: var(--ui-shadow);
  padding: 13px 14px;
  margin-bottom: 9px;
  transition: transform .15s ease, box-shadow .2s ease;
}
.qdii-item:active { transform: scale(.99); }

/* ---------- 定投/我的/账户/偏好 ---------- */
.fixed-plan-list { padding: 12px 14px; }
.plan-card { border-radius: 16px; box-shadow: var(--ui-shadow); border: 1px solid rgba(23, 32, 58, 0.02); }
.plan-name { font-size: 16px; font-weight: 700; }
.plan-amount { font-size: 19px; font-weight: 700; }
.plan-status { border-radius: 999px; }
.profile-menu { padding: 8px 14px; }
.profile-menu-item { border-radius: 14px; box-shadow: var(--ui-shadow); margin-bottom: 10px; padding: 15px 16px; transition: transform .12s ease; }
.profile-menu-item:active { transform: scale(.98); }
.profile-menu-icon { border-radius: 12px; width: 38px; height: 38px; font-size: 18px; }
.profile-menu-text { font-size: 15px; font-weight: 600; }
/* 退出登录: 红色语义 */
.profile-menu-item.logout { color: #e5484d; }
.profile-menu-item.logout .profile-menu-text { color: #e5484d; }
.profile-menu-item.logout .profile-menu-icon { background: rgba(229, 72, 77, 0.1); color: #e5484d; }
body.dark .profile-menu-item.logout .profile-menu-icon { background: rgba(229, 72, 77, 0.18); color: #ff6b70; }
/* 暗色: 普通菜单图标去浅色底, 与底部导航一致 */
body.dark .profile-menu-icon { background: transparent; color: #8ab0ff; }
.account-form { padding: 8px 14px; }
.pref-tip { font-size: 13px; color: var(--ui-text-3); padding: 6px 18px; }
.pref-item { border-radius: 14px; box-shadow: var(--ui-shadow); margin-bottom: 10px; }

/* 加载/骨架/空态 */
.loading { color: var(--ui-text-3); }
.empty-page { color: var(--ui-text-3); }
.skeleton-item { background: var(--ui-card); border-radius: var(--ui-radius); box-shadow: var(--ui-shadow); }
.sk-line, .sk-line-long, .sk-line-mid, .sk-line-short { border-radius: 4px; }

/* ---------- 登录页 ---------- */
.auth-box {
  max-width: 380px;
  margin: 12vh auto;
  border-radius: 22px;
  box-shadow: var(--ui-shadow-hover);
  background: #fff;
  border: 1px solid var(--ui-line);
  padding: 34px 28px 26px;
}
.auth-title { text-align: center; font-size: 22px; font-weight: 700; color: var(--ui-text); letter-spacing: 1px; }
.auth-subtitle { text-align: center; font-size: 12px; color: var(--ui-text-3); margin: 6px 0 24px; letter-spacing: 2px; }
.auth-tabs {
  background: var(--ui-bg);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 24px;
  border-bottom: none;
  gap: 4px;
}
.tab-btn { border-radius: 999px; font-size: 14px; padding: 8px 0; color: var(--ui-text-2); transition: all .18s ease; }
.tab-btn.active {
  background: var(--ui-primary);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(59, 108, 246, 0.25);
}
.tab-btn.active::after { display: none; }
.auth-form input {
  border-radius: 12px;
  border: 1px solid var(--ui-line-2);
  background: var(--ui-bg);
  padding: 12px 14px;
  font-size: 15px;
  color: var(--ui-text);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.auth-form input:focus {
  border-color: var(--ui-primary);
  box-shadow: 0 0 0 3px rgba(59, 108, 246, 0.12);
  background: #fff;
}
.auth-form .primary-btn { border-radius: 12px; padding: 12px; font-size: 15px; margin-top: 6px; }
/* 登录页暗色 */
body.dark .auth-box { background: #1b1d25; border-color: #262932; }
body.dark .auth-form input { background: #16181f; border-color: #262932; color: #e6e9f2; }
body.dark .auth-form input:focus { background: #1b1d25; border-color: #3b6cf6; box-shadow: 0 0 0 3px rgba(59, 108, 246, 0.2); }
body.dark .auth-tabs { background: #16181f; }

/* 页脚 */
.app-footer { color: var(--ui-text-3); font-size: 11px; }

/* ===================== UI 2.0 · 图标(SVG 线性, 一套统一) ===================== */
.nav-icon { display: flex; align-items: center; justify-content: center; }
.nav-icon svg { width: 22px; height: 22px; display: block; }
.profile-menu-icon svg { width: 20px; height: 20px; display: block; }

/* =========================================================
   UI 2.0 · 暗色主题
   ========================================================= */
body.dark { background: #131419; color: #e7e9f0; }
body.dark .page-header { background: rgba(24, 26, 34, 0.82); backdrop-filter: saturate(180%) blur(14px); }
body.dark .bottom-nav { background: rgba(24, 26, 34, 0.9); border-top-color: #23252e; }
body.dark .detail-action-bar { background: rgba(24, 26, 34, 0.9); border-top-color: #23252e; }
body.dark .fund-summary-bar { background: #1b2130; border-bottom-color: #262c3d; }
body.dark .summary-item:not(:first-child) { border-left-color: #262c3d; }
body.dark .summary-main .summary-value { color: #e7e9f0; }
body.dark .summary-value.profit { color: #ff6b6b; }
body.dark .summary-value.loss { color: #4ade80; }
body.dark .group-tab-item, body.dark .zx-group-tab-item { background: #1e2028; border-color: #262932; color: #a6adbd; }
body.dark .group-tab-item.active, body.dark .zx-group-tab-item.active { background: var(--ui-primary); border-color: var(--ui-primary); color: #fff; }
body.dark .detail-section, body.dark .us-index-card,
body.dark .qdii-item, body.dark .plan-card, body.dark .skeleton-item, body.dark .cal-grid {
  background: #1b1d25;
  border-color: #23262f;
  box-shadow: 0 1px 2px rgba(0,0,0,0.3), 0 6px 20px rgba(0,0,0,0.18);
}
/* 持仓/自选: 大卡片容器暗色, 行透明(分隔线风格) */
body.dark .fund-list-body { background: #1b1d25; }
body.dark .group-summary-body { background: #1b1d25; }
body.dark .fund-item { background: transparent; box-shadow: none; border-bottom-color: #23262f; }
body.dark .fund-name-info .name, body.dark .detail-section .section-title,
body.dark .plan-name, body.dark .info-value, body.dark .summary-value, body.dark .summary-label { color: #e7e9f0; }
body.dark .fund-name-info .sub, body.dark .fund-value-info .price, body.dark .fund-day-profit .net-date,
body.dark .fund-total-profit .total-rate, body.dark .info-label, body.dark .summary-time { color: #8b92a3; }
body.dark .modal-container { background: #1b1d25; }
body.dark .modal-header { border-bottom-color: #23262f; }
body.dark .modal-header h3 { color: #e7e9f0; }
body.dark .modal-footer { border-top-color: #23262f; }
body.dark .form-item label { color: #a6adbd; }
body.dark .form-item input, body.dark .form-item textarea, body.dark .group-select, body.dark .plan-select { background: #23262f; border-color: #2e323d; color: #e7e9f0; }
body.dark .context-menu { background: #1b1d25; border-color: #23262f; }
body.dark .menu-item { color: #e7e9f0; }
body.dark .menu-item:active { background: #262932; }
body.dark .cancel-btn { background: #23262f; border-color: #2e323d; color: #a6adbd; }
body.dark .data-table th, body.dark .stock-table th { background: #20222b; color: #a6adbd; border-bottom-color: #2e323d; }
body.dark .data-table td, body.dark .stock-table td { color: #d8dbe4; border-bottom-color: #23262f; }
body.dark .us-table-head { background: #1b1d25; }
/* 美股夜盘: 基金列表容器与展开详情去浅色底, 暗色适配 */
body.dark .us-stock-list { background: transparent; }
body.dark .qdii-detail { background: #23262f; border-top-color: #23262f; }
body.dark .qdii-detail-head { color: #e7e9f0; border-bottom-color: #23262f; }

/* =========================================================
   添加基金弹窗: 双 Tab(手动添加 / 截图识别)
   ========================================================= */
.add-tabs { display: flex; padding: 0 20px; border-bottom: 1px solid var(--ui-line, #f0f0f0); }
.add-tabs .add-tab {
  padding: 10px 16px; font-size: 14px; color: #8c90a3; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px; user-select: none;
}
.add-tabs .add-tab.active { color: #1677ff; font-weight: 600; border-bottom-color: #1677ff; }
.add-tab-panel { width: 100%; }

/* 截图识别: 上传区 / 简化卡片 - 仅 名称/代码/持有金额/持有收益 可编辑, 其余自动计算 */
.modal-wide { max-width: 680px !important; }
.batch-upload {
  border: 1.5px dashed #d9dde8; border-radius: 10px; padding: 18px 12px;
  text-align: center; cursor: pointer; margin-bottom: 12px; transition: border-color .15s;
}
.batch-upload:active { border-color: #1677ff; }
.batch-upload-placeholder { font-size: 14px; color: #333; line-height: 1.7; }
.batch-upload-placeholder span { font-size: 11px; color: #8c90a3; }
/* 缩小版预览图: 限高居中, 不会撑出滚动条 */
.batch-preview {
  display: none; max-width: 100%; max-height: 140px; height: auto;
  margin: 10px auto 0; border-radius: 8px;
  box-shadow: 0 1px 4px rgba(20, 26, 69, 0.08);
}
.batch-parse-btn { width: 100%; margin: 0 0 8px; }
.batch-parse-btn[disabled] { opacity: .5; }
.batch-tip-line { font-size: 11px; color: #8c90a3; text-align: center; margin: 0 0 8px; line-height: 1.5; }

/* ===================== 列表齿轮菜单 ===================== */
.col-config-menu {
  position: fixed; z-index: 60; min-width: 140px;
  background: #fff; border: 1px solid #eceff5; border-radius: 10px;
  box-shadow: 0 4px 16px rgba(20, 26, 69, 0.12); padding: 6px;
}
.col-config-menu .ccm-item {
  padding: 9px 12px; font-size: 13px; color: #333; border-radius: 6px; cursor: pointer;
}
.col-config-menu .ccm-item:active { background: #f0f4ff; color: #1677ff; }
body.dark .col-config-menu { background: #1f2129; border-color: #2a2a30; }
body.dark .col-config-menu .ccm-item { color: #d8dbe4; }

/* ===================== 批量操作 ===================== */
.fund-batch-bar {
  position: fixed; left: 0; right: 0; bottom: 92px; z-index: 50;
  display: flex; align-items: center; gap: 10px;
  background: #fff; border-top: 1px solid #eceff5;
  padding: 10px 14px; box-shadow: 0 -2px 10px rgba(20, 26, 69, 0.06);
}
.batch-all { display: flex; align-items: center; gap: 4px; font-size: 13px; color: #333; flex-shrink: 0; }
.batch-count { font-size: 12px; color: #8c90a3; flex-shrink: 0; }
.batch-actions { display: flex; gap: 8px; flex: 1; justify-content: flex-end; flex-wrap: wrap; }
.batch-op-btn {
  padding: 6px 12px; font-size: 12.5px; color: #1677ff; background: #f0f4ff;
  border-radius: 6px; flex-shrink: 0;
}
.batch-op-btn.danger { color: #ff4d4f; background: #fff1f0; }
.batch-op-btn:active { opacity: 0.8; }
/* 列表列: 批量复选框 */
.col-check { width: 30px; flex: 0 0 30px; display: flex; align-items: center; justify-content: center; }
.batch-check { width: 17px; height: 17px; accent-color: #1677ff; cursor: pointer; }
.col-check .batch-check { appearance: auto; -webkit-appearance: auto; }

/* 批量编辑弹窗: 逐只输入(两行: 名称行 + 字段行) */
.batch-edit-list { max-height: 40vh; overflow-y: auto; }
.batch-edit-row {
  padding: 8px 4px; margin-bottom: 8px;
  border: 1px solid #eceff5; border-radius: 10px; background: #f7f9fc;
}
.batch-edit-row .ber-line1 {
  display: flex; align-items: center; gap: 8px; padding: 0 10px 6px;
  border-bottom: 1px dashed #e4e8f0; margin-bottom: 6px;
}
.batch-edit-row .ber-name { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.batch-edit-row .ber-code { font-size: 12px; color: #8c90a3; flex-shrink: 0; }
.batch-edit-row .ber-line2 { display: flex; align-items: flex-end; gap: 10px; padding: 0 10px; flex-wrap: nowrap; }
.batch-edit-row .ber-field { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.batch-edit-row .ber-field label { font-size: 11px; color: #8c90a3; }
.batch-edit-row .ber-field input { width: 100%; padding: 5px 8px; font-size: 13px; }
.batch-edit-row .ber-field:first-child { flex: 1 1 auto; }
.batch-edit-row .ber-field.ber-fee-item { flex: 0 0 86px; position: relative; }
.batch-edit-row .ber-fee { padding-right: 22px; }
.batch-edit-row .ber-pct { position: absolute; right: 8px; bottom: 7px; font-size: 11px; color: #8c90a3; }
/* 持有时间字段(不足7天标红) */
.batch-edit-row .ber-hold-field.ber-field { flex: 0 0 auto; }
.batch-edit-row .ber-holddays { font-size: 12px; color: #8c90a3; height: 31px; display: flex; align-items: center; }
.ber-holddays.ber-soon { color: #ff4d4f; }

body.dark .fund-batch-bar { background: #1f2129; border-top-color: #2a2a30; }
body.dark .batch-all { color: #d8dbe4; }
body.dark .batch-op-btn { color: #4d9fff; background: #202b44; }
body.dark .batch-op-btn.danger { color: #ff6b6e; background: #3a2326; }
body.dark .batch-edit-row { background: #1e2028; border-color: #2a2a30; }
body.dark .batch-edit-row .ber-name { color: #d8dbe4; }
body.dark .batch-edit-row .ber-line1 { border-bottom-color: #2a2a30; }
body.dark .batch-edit-row .ber-field label { color: #8b92a3; }
.batch-loading { font-size: 12px; color: #1677ff; margin: 4px 0 10px; }
.batch-cards { margin-bottom: 10px; }
.batch-card {
  position: relative; background: #f7f9fc; border: 1px solid #eceff5; border-radius: 12px;
  padding: 8px 10px 6px; margin-bottom: 8px; transition: transform .1s ease;
}
.batch-card:active { transform: scale(.99); }
.bc-top { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.bc-top .b-name {
  flex: 1 1 auto; min-width: 0; border: none; outline: none; background: transparent;
  font-size: 14px; font-weight: 600; color: #141a45; padding: 2px 6px 2px 0;
}
.bc-top .b-name:focus { border-bottom: 1px solid #1677ff; border-radius: 0; }
.bc-top .b-name.b-invalid { border-bottom: 1px solid #ffa39e; background: transparent; }
.bc-top .b-code { flex: 0 0 96px; width: 96px; font-size: 11px; letter-spacing: .3px; }
.bc-name-view {
  flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 13px; font-weight: 600; color: #141a45; padding: 3px 26px 3px 0;
}
.bc-name-view.bc-name-missing { color: #bfc3cf; font-weight: 400; }
/* 删除按钮: 固定在卡片右上角, 不占布局空间 */
.batch-card .b-del {
  position: absolute; top: -7px; right: -10px; z-index: 2;
}
.bc-fields { display: flex; gap: 8px; flex-wrap: wrap; }
.bc-field { flex: 1; min-width: 96px; }
.bc-field label { display: block; font-size: 11px; color: #8c90a3; margin-bottom: 3px; }
.bc-field input, .bc-top .b-code {
  width: 100%; box-sizing: border-box; padding: 6px 7px; font-size: 13px;
  border: 1px solid #e2e5ee; border-radius: 8px; background: #fff; color: #333; outline: none;
}
.bc-field input.b-invalid, .bc-top .b-code.b-invalid { border-color: #ffa39e; background: #fff2f0; }
.bc-calc { display: flex; align-items: baseline; gap: 18px; font-size: 11px; color: #8c90a3; margin-top: 4px; }
.bc-calc .val { color: #141a45; font-weight: 600; }
.b-del {
  width: 22px; height: 22px; border-radius: 50%; border: none;
  background: #f1f3f7; color: #999; font-size: 13px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; padding: 0;
}
.b-del:active { background: #ffecec; color: #f5222d; }
.batch-add-row {
  width: 100%; padding: 8px; border: 1px dashed #d9dde8; border-radius: 8px;
  background: #fafbfd; color: #1677ff; font-size: 13px; cursor: pointer;
}
.batch-confirm-btn { width: 100%; margin-top: 12px; }
body.dark .add-tabs { border-bottom-color: #23262f; }
body.dark .add-tabs .add-tab { color: #8b92a3; }
body.dark .add-tabs .add-tab.active { color: var(--ui-primary, #4d9fff); border-bottom-color: var(--ui-primary, #4d9fff); }
body.dark .batch-upload { border-color: #2e323d; }
body.dark .batch-upload-placeholder { color: #d8dbe4; }
body.dark .batch-upload-placeholder span { color: #8b92a3; }
body.dark .batch-tip-line { color: #8b92a3; }
body.dark .batch-card { background: #1f2129; border-color: #2a2a30; }
body.dark .bc-top .b-name { color: #e7e9f0; }
body.dark .bc-field input, body.dark .bc-top .b-code { background: #23262f; border-color: #2e323d; color: #e7e9f0; }
body.dark .bc-calc { color: #8b92a3; }
body.dark .bc-calc .val { color: #d8dbe4; }
body.dark .b-del { background: #2e323d; color: #9aa0b0; }
body.dark .batch-add-row { background: #20222b; border-color: #2e323d; }
body.dark .us-stock-item { border-bottom-color: #23262f; }
body.dark .us-stock-price { color: #e7e9f0; }
body.dark .us-source-tag { background: #2e323d; color: #8b92a3; }
body.dark .cal-mode-tabs, body.dark .cal-view-toggle { background: #23262f; }
body.dark .cal-mode-tab.active, body.dark .cal-view-toggle span.active { background: #2e323d; color: #8ab0ff; }
body.dark .action-btn { background: #262932; color: #a6adbd; }
body.dark .profile-menu-item, body.dark .pref-item { background: #1b1d25; }
body.dark .search input, body.dark .fund-search-input { background: #1e2028; border-color: #262932; color: #e7e9f0; }
body.dark .text-btn { color: #8ab0ff; }
body.dark .primary-btn { background: linear-gradient(135deg, #4d7cff, #3b6cf6); }
body.dark .cal-summary-card { background: linear-gradient(135deg, #1b1d25, #1e2230); border-color: #23262f; }
body.dark .updated-tag { background: rgba(74, 111, 245, 0.18); color: #8ab0ff; }
body.dark .group-tag, body.dark .fund-group-tag { background: rgba(74, 111, 245, 0.18); color: #8ab0ff; }
body.dark .zx-note-badge { background: rgba(74, 111, 245, 0.18); color: #8ab0ff; border-color: rgba(138, 176, 255, 0.25); }
body.dark .plan-badge { background: rgba(74, 111, 245, 0.18); color: #8ab0ff; }
body.dark .market-entry-card { background: linear-gradient(135deg, #23273a, #2c3350); }
body.dark .fund-search-results, body.dark .fund-suggest { background: #1b1d25; border-color: #23262f; }
body.dark .fund-search-results .fs-item, body.dark .fund-suggest .fs-item { color: #e7e9f0; }
body.dark .fund-search-results .fs-name, body.dark .fund-suggest .fs-name { color: #e7e9f0; }
body.dark .fund-search-results .fs-code, body.dark .fund-suggest .fs-code,
body.dark .fund-search-results .fs-type, body.dark .fund-suggest .fs-type { color: #8b92a3; }
body.dark .app-footer { background: transparent; color: #5a5d6a; }
body.dark .log-item, body.dark .group-option, body.dark .manage-group-item, body.dark .zx-note-item { background: #23262f; }
body.dark .fs-empty { color: #8b92a3; }

/* 窄屏下主色调整(保持观感) */
@media (max-width: 767px) {
  .summary-value { font-size: 17px; }
  .fund-list-body, .group-summary-body { padding: 0; margin: 4px 10px 14px; }
  .fund-item, .gs-row, .gs-head-row { padding: 13px 12px; }
}

/* ===================== 留言反馈页 ===================== */
.feedback-container { padding: 16px; }
#feedbackContent {
  width: 100%;
  border: 1px solid var(--ui-line-2);
  border-radius: 12px;
  padding: 12px;
  font-size: 15px;
  line-height: 1.6;
  resize: none;
  background: var(--ui-card);
  color: var(--ui-text);
  font-family: inherit;
}
#feedbackContent:focus { border-color: var(--ui-primary); }
.feedback-upload {
  margin: 12px 0;
  border: 1px dashed var(--ui-line-2);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  background: var(--ui-card);
  transition: border-color .15s ease;
}
.feedback-upload:active { border-color: var(--ui-primary); }
#feedbackImage { display: none; }
.upload-text { color: var(--ui-text-3); font-size: 14px; }
.preview-images { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.preview-img {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--ui-bg);
}
.preview-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.remove-img {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}
.feedback-submit { width: 100%; border-radius: 10px; padding: 11px 16px; font-size: 15px; font-weight: 500; }
.feedback-list { margin-top: 24px; }
.list-title { font-size: 16px; font-weight: 600; margin-bottom: 12px; color: var(--ui-text); }
.feedback-item {
  background: var(--ui-card);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: var(--ui-shadow);
}
.feedback-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.feedback-nickname { font-weight: 600; font-size: 14px; color: var(--ui-text); }
.feedback-time { font-size: 12px; color: var(--ui-text-3); }
.feedback-content { font-size: 14px; color: var(--ui-text); margin-bottom: 8px; word-break: break-word; }
.feedback-images { display: flex; flex-wrap: wrap; gap: 8px; }
.feedback-images img {
  width: 90px;
  height: 90px;
  border-radius: 10px;
  object-fit: cover;
  display: block;
  cursor: pointer;
}
/* ===================== 关于版本页 ===================== */
.about-content { padding: 24px 20px; text-align: center; }
.version-text {
  font-size: 17px;
  font-weight: 600;
  color: var(--ui-text);
  margin-top: 20px;
}
.changelog { margin-top: 24px; text-align: left; }
.changelog-item { margin-bottom: 18px; }
.changelog-title {
  font-size: 14px; font-weight: 600; color: var(--ui-text);
  padding-bottom: 6px; border-bottom: 1px solid var(--ui-line, #f0f0f0); margin-bottom: 8px;
}
.changelog-list { padding-left: 20px; margin: 0; }
.changelog-list li { font-size: 13px; color: #55566b; line-height: 1.8; }
/* 留言板/关于页 暗色适配 */
body.dark #feedbackContent { background: #1e2028; border-color: #2e323d; color: #e7e9f0; }
body.dark .feedback-upload { background: #1e2028; border-color: #2e323d; }
body.dark .feedback-item { background: #1b1d25; }
body.dark .feedback-nickname { color: #e7e9f0; }
body.dark .feedback-content { color: #d8dbe4; }
body.dark .changelog-title { color: #e7e9f0; border-bottom-color: #23262f; }
body.dark .changelog-list li { color: #9aa0b0; }

