/* ===== A股组合追踪 样式 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  background: #f5f6fa;
  color: #2c3e50;
  padding-bottom: 40px;
}

.app { max-width: 640px; margin: 0 auto; padding: 0 12px; }

/* 顶部 */
.header {
  position: sticky; top: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  background: linear-gradient(135deg, #1a6b4c, #2aaa8a);
  color: #fff; padding: 14px 18px;
  border-radius: 0 0 16px 16px;
  box-shadow: 0 2px 12px rgba(26, 107, 76, 0.25);
}
.header-title { font-size: 18px; font-weight: 700; }
.header-status { font-size: 12px; background: rgba(255,255,255,0.2); padding: 4px 10px; border-radius: 20px; }

/* Tab 切换 */
.tabs {
  display: flex; background: #fff; border-radius: 12px; margin-top: 12px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06); overflow: hidden;
}
.tab {
  flex: 1; text-align: center; padding: 12px 0; font-size: 14px; font-weight: 600;
  color: #95a5a6; cursor: pointer; border-bottom: 3px solid transparent;
}
.tab.active { color: #1a6b4c; border-bottom-color: #1a6b4c; }

/* 策略追踪 */
.strat-note {
  background: #fffbe8; border: 1px solid #f5e6a8; color: #8a6d1f;
  border-radius: 10px; padding: 10px 12px; font-size: 12px; margin-top: 12px; line-height: 1.5;
}
.panel-section { margin-top: 16px; }
.panel-title {
  font-size: 15px; font-weight: 700; padding: 0 4px 10px;
  display: flex; align-items: center; gap: 8px;
}
.panel-date { font-size: 11px; color: #95a5a6; font-weight: 400; }
.strategy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* 基准对比 */
.bench-section {
  background: #fff; border-radius: 12px; padding: 10px 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05); margin-bottom: 12px;
}
.bench-title { font-size: 11px; color: #95a5a6; margin-bottom: 8px; font-weight: 600; }
.bench-time { float: right; font-weight: 400; font-size: 10px; color: #bdc3c7; }
.bench-row { display: flex; gap: 8px; flex-wrap: wrap; }
.bench-item {
  flex: 1; min-width: 90px; background: #f8f9fa; border-radius: 8px;
  padding: 6px 8px; text-align: center;
}
.bench-name { display: block; font-size: 11px; color: #7f8c8d; }
.bench-ret { display: block; font-size: 16px; font-weight: 800; margin-top: 2px; }
.bench-avg .bench-ret { font-size: 18px; }
.bench-avg { background: #fffbe6; border: 1px solid #ffe58f; }

.strategy-card {
  background: #fff; border-radius: 12px; padding: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05); cursor: pointer;
  transition: transform 0.15s;
}
.strategy-card:active { transform: scale(0.97); }
.strategy-card.expanded { grid-column: 1 / -1; }
.strategy-name { font-size: 13px; font-weight: 700; color: #2c3e50; }
.strategy-meta { font-size: 10px; color: #bdc3c7; margin-top: 2px; }
.strategy-ret { font-size: 20px; font-weight: 800; margin-top: 8px; }
.strategy-active { font-size: 11px; font-weight: 600; margin-top: 4px; }
.strategy-detail { margin-top: 10px; padding-top: 10px; border-top: 1px dashed #f0f2f5; }
.strategy-detail-title { font-size: 11px; color: #95a5a6; margin-bottom: 6px; }
.holding-mini {
  display: flex; justify-content: space-between; align-items: center;
  padding: 5px 0; border-bottom: 1px solid #f8f9fa; font-size: 12px;
}
.holding-mini:last-child { border-bottom: none; }
.holding-mini-name { font-weight: 600; }
.holding-mini-wt { color: #95a5a6; font-size: 11px; margin: 0 6px; }
.holding-mini-chg { font-weight: 600; }

/* 负面清单: 个股行 */
.neg-stock {
  padding: 8px 0; border-bottom: 1px solid #f8f9fa;
}
.neg-stock:last-child { border-bottom: none; }
.neg-bench { padding: 0 12px 4px; font-size: 12px; color: #7f8c8d; }
.neg-stock-head {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px;
}
.neg-stock-name { font-weight: 700; font-size: 13px; color: #2c3e50; }
.neg-stock-code { color: #95a5a6; font-size: 10px; }
.neg-stock-chg { font-weight: 700; font-size: 12px; margin-left: auto; }
.neg-stock-price { color: #95a5a6; font-size: 11px; }
.neg-stock-summary {
  font-size: 12px; color: #555; line-height: 1.55;
  margin-top: 4px; background: #fafafa; border-radius: 8px; padding: 6px 8px;
}
.neg-stock-summary.muted { color: #bdc3c7; font-style: italic; }

/* 总览卡片 */
.summary-card {
  background: #fff; border-radius: 14px; padding: 18px 14px; margin-top: 14px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}
.summary-row { display: flex; }
.summary-item { flex: 1; text-align: center; }
.summary-label { font-size: 12px; color: #95a5a6; margin-bottom: 6px; }
.summary-value { font-size: 16px; font-weight: 700; }
.summary-meta { display: flex; justify-content: space-between; margin-top: 12px; padding-top: 10px; border-top: 1px dashed #ecf0f1; font-size: 11px; color: #bdc3c7; }

/* 涨跌颜色 */
.up { color: #e74c3c; }
.down { color: #2ecc71; }
.flat { color: #7f8c8d; }

/* 图表 */
.chart-card {
  background: #fff; border-radius: 14px; padding: 16px 14px; margin-top: 12px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06); position: relative;
}
.chart-title { font-size: 14px; font-weight: 600; margin-bottom: 10px; }
#netValueChart { width: 100%; height: 180px; }
.chart-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #bdc3c7; font-size: 13px; }

/* 持仓列表 */
.holdings-section { margin-top: 14px; }
.section-header { display: flex; justify-content: space-between; align-items: center; padding: 0 4px 10px; }
.section-header span { font-size: 16px; font-weight: 700; }
.btn-add {
  background: #1a6b4c; color: #fff; border: none; border-radius: 20px;
  padding: 7px 16px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.empty-tip { text-align: center; color: #bdc3c7; padding: 40px 0; font-size: 14px; }

.holding-card {
  background: #fff; border-radius: 12px; padding: 14px; margin-bottom: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.holding-top { display: flex; justify-content: space-between; align-items: center; }
.holding-name { font-size: 15px; font-weight: 700; }
.holding-code { font-size: 11px; color: #bdc3c7; margin-left: 6px; }
.holding-price { font-size: 16px; font-weight: 700; }
.holding-change { font-size: 12px; text-align: right; }

.holding-detail {
  display: flex; justify-content: space-between; margin-top: 10px;
  padding-top: 10px; border-top: 1px dashed #f0f2f5;
}
.holding-cell { flex: 1; }
.holding-cell-label { font-size: 11px; color: #95a5a6; }
.holding-cell-value { font-size: 13px; font-weight: 600; margin-top: 2px; }

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center; z-index: 1000;
}
.modal {
  background: #fff; border-radius: 14px; width: 86%; max-width: 400px;
  overflow: hidden; animation: slideUp 0.25s ease;
}
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-title { font-size: 16px; font-weight: 700; padding: 16px 18px; border-bottom: 1px solid #f0f2f5; }
.modal-body { padding: 16px 18px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #7f8c8d; margin-bottom: 6px; }
.form-group input {
  width: 100%; border: 1px solid #e0e4e8; border-radius: 8px;
  padding: 10px 12px; font-size: 15px; outline: none;
}
.form-group input:focus { border-color: #2aaa8a; }
.form-tip { font-size: 11px; color: #bdc3c7; }
.modal-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 18px; border-top: 1px solid #f0f2f5;
}
.modal-footer-right { display: flex; gap: 10px; }
.btn-confirm {
  background: #1a6b4c; color: #fff; border: none; border-radius: 8px;
  padding: 9px 22px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.btn-cancel {
  background: #f0f2f5; color: #7f8c8d; border: none; border-radius: 8px;
  padding: 9px 22px; font-size: 14px; cursor: pointer;
}
.btn-danger {
  background: #fff; color: #e74c3c; border: 1px solid #e74c3c; border-radius: 8px;
  padding: 9px 18px; font-size: 14px; cursor: pointer;
}
