/* 基金持仓页样式 */

/* 顶部导航栏 */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background-color: #165DFF;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
  margin: -16px -16px 16px -16px;
}

.nav-left {
  display: flex;
  align-items: center;
}

.nav-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 16px;
}

.nav-image {
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1);
}

.nav-title {
  font-size: 18px;
}

.nav-actions {
  display: flex;
  align-items: center;
}

.settings-icon,
.filter-icon {
  margin-left: 16px;
}

.icon-text {
  font-size: 20px;
}

/* 持仓总览 */
.holdings-overview {
  margin-bottom: 16px;
}

.overview-header {
  margin-bottom: 12px;
}

.overview-amount {
  margin-bottom: 16px;
}

.amount-label {
  display: block;
  margin-bottom: 4px;
}

.amount-value {
  font-size: 24px;
}

.overview-details {
  display: flex;
  justify-content: space-between;
}

.overview-item {
  flex: 1;
}

.overview-label {
  display: block;
  margin-bottom: 4px;
}

.overview-value {
  display: block;
}

/* 选项卡 */
.tab-bar {
  display: flex;
  background-color: #FFFFFF;
  border-radius: 8px;
  padding: 4px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.tab-item {
  flex: 1;
  text-align: center;
  padding: 12px;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.tab-item.active {
  background-color: #165DFF;
}

.tab-item.active .tab-text {
  color: #FFFFFF;
  font-weight: 500;
}

.tab-text {
  font-size: 14px;
  color: #4E5969;
}

/* 持仓基金列表 */
.fund-list {
  margin-bottom: 16px;
}

.fund-item {
  margin-bottom: 12px;
}

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

.fund-name {
  font-size: 16px;
}

.fund-code {
  font-size: 12px;
}

.fund-info,
.fund-holding {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.info-item,
.holding-item {
  flex: 1;
}

.info-label,
.holding-label {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
}

.info-value,
.holding-value {
  display: block;
  font-size: 14px;
}

.fund-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #F2F3F5;
}

.action-btn {
  flex: 1;
  height: 36px;
  margin: 0 4px;
  border: 1px solid #165DFF;
  border-radius: 6px;
  font-size: 14px;
  color: #165DFF;
  background-color: #FFFFFF;
}

/* 持仓分析 */
.holding-analysis {
  margin-bottom: 16px;
}

.analysis-content {
  display: flex;
  align-items: center;
}

.pie-chart {
  width: 120px;
  height: 120px;
  background-color: #F2F3F5;
  border-radius: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 16px;
}

.analysis-legend {
  flex: 1;
}

.legend-item {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 6px;
  margin-right: 8px;
}

/* 风险提示 */
.risk-tip {
  padding: 12px;
  background-color: #F2F3F5;
  border-radius: 8px;
  text-align: center;
  margin-top: 16px;
}

.tip-text {
  font-size: 11px;
  line-height: 1.3;
}

/* 加载状态 */
.loading-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 0;
}

.loading-text {
  font-size: 14px;
  color: #4E5969;
}

/* 空状态 */
.empty-state {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 0;
}

.empty-text {
  font-size: 14px;
  color: #4E5969;
}

/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
  .tab-bar {
    background-color: #232324;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  }

  .tab-text {
    color: #C9CDD4;
  }

  .fund-actions {
    border-top-color: #333333;
  }

  .action-btn {
    border-color: #2F67FF;
    color: #2F67FF;
    background-color: #232324;
  }

  .pie-chart {
    background-color: #333333;
  }

  .risk-tip {
    background-color: #333333;
  }

  .loading-text,
  .empty-text {
    color: #C9CDD4;
  }
}
