/**
 * 基金详情增强样式
 */

/* ==================== 基金经理画像 ==================== */

#managerProfileContent {
  padding: 16px;
}

.manager-header {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.manager-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-amber));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.manager-basic {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.manager-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.manager-tenure {
  font-size: 12px;
  color: var(--text-secondary);
}

.manager-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

.manager-stats .stat-item {
  text-align: center;
}

.manager-stats .stat-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.manager-stats .stat-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-primary);
}

.manager-education,
.manager-experience,
.manager-philosophy,
.manager-performance {
  margin-bottom: 20px;
}

.section-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.education-text,
.experience-text,
.philosophy-text {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.6;
}

.performance-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 16px;
  background: rgba(var(--accent-primary-rgb), 0.05);
  border-radius: 8px;
}

.performance-item {
  text-align: center;
}

.performance-item .period {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.performance-item .return {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

/* ==================== 持仓明细 ==================== */

#holdingsDetailContent {
  padding: 16px;
}

.holdings-section {
  margin-bottom: 24px;
}

.holdings-section h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.holdings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.holdings-table th {
  padding: 8px 12px;
  text-align: left;
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-muted);
  font-weight: 500;
}

.holdings-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-primary);
}

.holdings-table .holding-name {
  font-weight: 500;
}

.holdings-table .holding-code {
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
}

.holdings-table .holding-ratio {
  text-align: right;
  color: var(--accent-primary);
  font-weight: 500;
}

.industry-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.industry-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.industry-name {
  width: 80px;
  font-size: 12px;
  color: var(--text-primary);
}

.industry-bar {
  flex: 1;
  height: 8px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  overflow: hidden;
}

.industry-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-amber));
  border-radius: 4px;
  transition: width 0.3s ease;
}

.industry-ratio {
  width: 50px;
  text-align: right;
  font-size: 12px;
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
}

/* ==================== 费率信息 ==================== */

#feesDetailContent {
  padding: 16px;
}

.fee-section {
  margin-bottom: 24px;
}

.fee-section h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.fee-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  margin-bottom: 8px;
}

.fee-item.total {
  background: linear-gradient(135deg, rgba(var(--accent-primary-rgb), 0.15), rgba(var(--accent-amber-rgb), 0.15));
  border: 1px solid var(--accent-primary);
}

.fee-label {
  font-size: 12px;
  color: var(--text-primary);
}

.fee-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.fee-value.standard {
  text-decoration: line-through;
  color: var(--text-muted);
  opacity: 0.7;
}

.fee-value.discount {
  color: var(--color-green);
}

.fee-note {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(var(--accent-amber-rgb), 0.1);
  border-radius: 6px;
  border-left: 3px solid var(--accent-amber);
}

.fee-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.fee-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-primary);
}

.fee-table td:first-child {
  color: var(--text-secondary);
}

.fee-table td:last-child {
  text-align: right;
  font-weight: 500;
  color: var(--accent-primary);
}

/* ==================== 风险指标 ==================== */

#riskMetricsContent {
  padding: 16px;
}

.risk-summary {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

.risk-level-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: white;
  flex-shrink: 0;
}

.risk-level-badge.green {
  background: var(--color-green);
}

.risk-level-badge.orange {
  background: var(--accent-amber);
}

.risk-level-badge.red {
  background: var(--color-red);
}

.risk-score-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.risk-score-label {
  font-size: 11px;
  color: var(--text-muted);
}

.risk-score-bar {
  height: 8px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  overflow: hidden;
}

.risk-score-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--color-green), var(--accent-amber), var(--color-red));
  transition: width 0.5s ease;
}

.risk-score-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.risk-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.risk-metric {
  padding: 16px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  text-align: center;
  transition: all 0.2s;
}

.risk-metric:hover {
  background: rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

.risk-metric .metric-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.risk-metric .metric-value {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.risk-metric .metric-value.highlight {
  color: var(--accent-primary);
}

.risk-metric .metric-value.positive {
  color: var(--color-green);
}

.risk-metric .metric-value.negative {
  color: var(--color-red);
}

.risk-metric .metric-desc {
  font-size: 10px;
  color: var(--text-muted);
  opacity: 0.8;
}

.risk-rating h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.rating-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.rating-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

.rating-agency {
  font-size: 12px;
  color: var(--text-primary);
}

.rating-stars {
  font-size: 14px;
  color: var(--accent-amber);
  letter-spacing: 2px;
}

/* ==================== 响应式设计 ==================== */

@media (max-width: 768px) {
  .manager-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .manager-stats {
    grid-template-columns: 1fr;
  }

  .performance-grid {
    grid-template-columns: 1fr;
  }

  .risk-metrics-grid {
    grid-template-columns: 1fr 1fr;
  }

  .rating-grid {
    grid-template-columns: 1fr;
  }

  .risk-summary {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ==================== 深色模式优化 ==================== */

@media (prefers-color-scheme: dark) {
  .manager-stats,
  .risk-summary {
    background: rgba(255, 255, 255, 0.05);
  }

  .fee-item,
  .risk-metric,
  .rating-item {
    background: rgba(255, 255, 255, 0.05);
  }

  .industry-bar {
    background: rgba(255, 255, 255, 0.1);
  }
}

/* ==================== 动画效果 ==================== */

.industry-progress,
.risk-score-progress {
  transition: width 0.5s ease, opacity 0.2s ease;
}

.risk-metric,
.rating-item {
  transition: all 0.2s ease;
}
