/**
 * portfolio-analysis.css — Week 8: 投资组合分析模块样式
 * 暗色主题，玻璃拟态风格
 */

/* ==================== 弹窗容器 ==================== */
.pa-modal {
  position: fixed;
  inset: 0;
  z-index: 10002;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
}

/* 弹窗打开时隐藏主页面的筛选器标签 */
body.modal-open #filterTags {
  display: none !important;
}

.pa-container {
  width: 92%;
  max-width: 960px;
  max-height: 88vh;
  background: linear-gradient(145deg, #1a1a2e 0%, #16162a 50%, #131324 100%);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 20px;
  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.6),
    0 0 40px rgba(99, 102, 241, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ==================== 头部 ==================== */
.pa-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(99, 102, 241, 0.04);
  flex-shrink: 0;
}

.pa-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: #e2e8f0;
  margin: 0;
  letter-spacing: -0.3px;
}

.pa-close {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: none;
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.pa-close:hover {
  background: rgba(239, 68, 68, 0.2);
  transform: scale(1.08);
}

/* ==================== Tab 导航 ==================== */
.pa-tabs {
  display: flex;
  gap: 4px;
  padding: 14px 20px;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  flex-shrink: 0;
  overflow-x: auto;
}

.pa-tab {
  padding: 9px 18px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
  font-family: inherit;
}
.pa-tab:hover {
  background: rgba(99, 102, 241, 0.08);
  color: #cbd5e1;
}
.pa-tab.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.15));
  color: #a5b4fc;
  box-shadow: 0 2px 12px rgba(99, 102, 241, 0.15);
}

/* ==================== 面板内容 ==================== */
.pa-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px 22px;
  scrollbar-width: thin;
  scrollbar-color: rgba(99, 102, 241, 0.3) transparent;
}
.pa-body::-webkit-scrollbar {
  width: 5px;
}
.pa-body::-webkit-scrollbar-track {
  background: transparent;
}
.pa-body::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.3);
  border-radius: 3px;
}

.pa-panel {
  display: none;
  animation: paFadeIn 0.3s ease;
}
.pa-panel.active {
  display: block;
}

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

/* ==================== 底部 ==================== */
.pa-footer {
  padding: 12px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  text-align: center;
  flex-shrink: 0;
}
.pa-hint {
  font-size: 12px;
  color: #64748b;
}

/* ==================== 区块标题 ==================== */
.pa-section-title {
  font-size: 14px;
  font-weight: 700;
  color: #e2e8f0;
  margin-bottom: 14px;
  padding-left: 10px;
  border-left: 3px solid #6366f1;
}

.pa-hint-text {
  font-size: 12px;
  color: #64748b;
  margin-top: 10px;
  line-height: 1.6;
}

/* ==================== 风险指标卡片网格 ==================== */
.pa-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.pa-metric-card {
  background: linear-gradient(145deg, rgba(30, 30, 50, 0.8), rgba(20, 20, 35, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}
.pa-metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 14px 14px 0 0;
}
.pa-metric-card.risk-high::before { background: linear-gradient(90deg, #ef4444, #f97316); }
.pa-metric-card.risk-medium::before { background: linear-gradient(90deg, #f59e0b, #eab308); }
.pa-metric-card.risk-low::before { background: linear-gradient(90deg, #22c55e, #14b8a6); }

.pa-metric-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  border-color: rgba(99, 102, 241, 0.15);
}

.pa-metric-icon {
  font-size: 26px;
  display: block;
  margin-bottom: 6px;
}

.pa-metric-value {
  display: block;
  font-size: 24px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: #f1f5f9;
  line-height: 1.2;
}

.pa-metric-label {
  display: block;
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 8px;
}

.pa-metric-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
  margin-top: auto;
}
.pa-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.6s ease;
}
.pa-bar-fill.danger { background: linear-gradient(90deg, #ef4444, #f97316); }
.pa-bar-fill.warning { background: linear-gradient(90deg, #f59e0b, #eab308); }
.pa-bar-fill.success { background: linear-gradient(90deg, #22c55e, #14b8a6); }

.pa-metric-desc {
  font-size: 11px;
  color: #64748b;
  margin-top: 6px;
}

/* ==================== 数据表格 ==================== */
.pa-table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.pa-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.pa-table thead th {
  padding: 11px 14px;
  background: rgba(99, 102, 241, 0.08);
  color: #a5b4fc;
  font-weight: 600;
  font-size: 12px;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid rgba(99, 102, 241, 0.15);
}
.pa-table tbody td {
  padding: 10px 14px;
  color: #cbd5e1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: background 0.15s;
}
.pa-table tbody tr:hover td {
  background: rgba(99, 102, 241, 0.04);
}
.pa-table tbody tr:last-child td {
  border-bottom: none;
}

/* Badge 样式 */
.badge-success {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.2);
}
.badge-danger {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.2);
}
.badge-warning {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.2);
}
.badge-info {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

/* ==================== 图表容器 ==================== */
.pa-chart-box {
  background: rgba(15, 15, 28, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 16px;
  min-height: 280px;
}
.pa-chart-box.half {
  flex: 1;
  min-width: 300px;
}

.pa-charts-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ==================== 资产配置对比 ==================== */
.allocation-compare-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.alloc-card {
  background: linear-gradient(145deg, rgba(25, 25, 45, 0.9), rgba(18, 18, 32, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 18px;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}
.alloc-card:hover {
  border-color: rgba(99, 102, 241, 0.2);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}
.alloc-card.overweight {
  border-color: rgba(245, 158, 11, 0.3);
}
.alloc-card.underweight {
  border-color: rgba(59, 130, 246, 0.3);
}

.alloc-type {
  font-size: 14px;
  font-weight: 700;
  color: #e2e8f0;
  margin-bottom: 14px;
}

.alloc-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.alloc-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.alloc-label {
  font-size: 11px;
  color: #94a3b8;
  width: 32px;
  flex-shrink: 0;
}
.alloc-track {
  flex: 1;
  height: 12px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  overflow: hidden;
}
.alloc-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.6s ease;
}
.alloc-fill.target {
  width: 50%;
  background: rgba(148, 163, 184, 0.25);
  border: 1px dashed rgba(148, 163, 184, 0.4);
}
.alloc-fill.current.bond {
  background: linear-gradient(90deg, #22c55e, #14b8a6);
}
.alloc-fill.current.domestic {
  background: linear-gradient(90deg, #6366f1, #a855f7);
}
.alloc-fill.current.overseas {
  background: linear-gradient(90deg, #3b82f6, #06b6d4);
}

.alloc-val {
  font-size: 12px;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  color: #cbd5e1;
  width: 38px;
  text-align: right;
}

.alloc-deviation {
  margin-top: 10px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}
.alloc-deviation.positive {
  background: rgba(245, 158, 11, 0.1);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.2);
}
.alloc-deviation.negative {
  background: rgba(59, 130, 246, 0.1);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

/* ==================== 再平衡提醒 ==================== */
.rebalance-alert {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid;
  transition: all 0.25s ease;
}
.rebalance-alert.warning {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.2);
}
.rebalance-alert.ok {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.2);
}

.alert-icon {
  font-size: 22px;
  flex-shrink: 0;
  line-height: 1;
}
.alert-content strong {
  display: block;
  font-size: 14px;
  color: #e2e8f0;
  margin-bottom: 4px;
}
.alert-content p {
  font-size: 13px;
  color: #94a3b8;
  margin: 0;
  line-height: 1.6;
}

/* ==================== 压力测试 ==================== */
.stress-test-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.stress-card {
  background: linear-gradient(145deg, rgba(25, 25, 45, 0.85), rgba(18, 18, 32, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 14px 16px;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}
.stress-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
.stress-card.severe {
  border-left-color: #ef4444;
}
.stress-card.moderate {
  border-left-color: #f59e0b;
}
.stress-card.mild {
  border-left-color: #22c55e;
}

.stress-name {
  font-size: 13px;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 6px;
}
.stress-impact {
  font-size: 20px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 6px;
}
.text-danger { color: #f87171; }
.text-warning { color: #fbbf24; }
.text-success { color: #4ade80; }

.stress-detail {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #64748b;
}

/* ==================== 行业集中度 ==================== */
.conc-metrics {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.conc-item {
  flex: 1;
  min-width: 100px;
  background: linear-gradient(145deg, rgba(25, 25, 45, 0.85), rgba(18, 18, 32, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  transition: all 0.2s ease;
}
.conc-item:hover {
  border-color: rgba(99, 102, 241, 0.2);
  transform: translateY(-2px);
}

.conc-value {
  display: block;
  font-size: 22px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: #a5b4fc;
  line-height: 1.2;
}
.conc-label {
  display: block;
  font-size: 11px;
  color: #64748b;
  margin-top: 4px;
}

/* 行业圆点 */
.industry-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

.mini-bar {
  width: 60px;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
}
.mini-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
}

/* ==================== 风格暴露详情 ==================== */
.style-details-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.style-detail-card {
  background: linear-gradient(145deg, rgba(25, 25, 45, 0.85), rgba(18, 18, 32, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  transition: all 0.2s ease;
  border-top: 3px solid transparent;
}
.style-detail-card.high {
  border-top-color: #6366f1;
}
.style-detail-card.medium {
  border-top-color: #f59e0b;
}
.style-detail-card.low {
  border-top-color: #22c55e;
}
.style-detail-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.style-name {
  font-size: 13px;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 6px;
}
.style-value {
  font-size: 22px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: #f1f5f9;
  margin-bottom: 8px;
}

.style-bar {
  height: 5px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}
.style-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease;
}
.style-bar-fill.value { background: linear-gradient(90deg, #6366f1, #8b5cf6); }
.style-bar-fill.growth { background: linear-gradient(90deg, #22c55e, #14b8a6); }
.style-bar-fill.large { background: linear-gradient(90deg, #3b82f6, #06b6d4); }
.style-bar-fill.mid { background: linear-gradient(90deg, #f59e0b, #eab308); }
.style-bar-fill.small { background: linear-gradient(90deg, #ec4899, #f43f5e); }
.style-bar-fill.quality { background: linear-gradient(90deg, #14b8a6, #06b6d4); }
.style-bar-fill.momentum { background: linear-gradient(90deg, #f59e0b, #ef4444); }
.style-bar-fill.volatility { background: linear-gradient(90deg, #a855f7, #6366f1); }

.style-desc {
  font-size: 10px;
  color: #64748b;
  line-height: 1.4;
}

/* ==================== 风格漂移检测 ==================== */
.drift-detection {
  background: linear-gradient(145deg, rgba(20, 20, 35, 0.9), rgba(15, 15, 28, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 18px;
}

.drift-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.drift-status.ok .drift-icon {
  font-size: 18px;
}
.drift-status.warn .drift-icon {
  font-size: 18px;
}
.drift-status span:not(.drift-icon) {
  font-size: 14px;
  font-weight: 600;
  color: #4ade80;
}
.drift-status.warn span:not(.drift-icon) {
  color: #fbbf24;
}

.drift-detail {
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.8;
  padding-left: 28px;
}

/* ==================== 响应式适配 ==================== */
@media (max-width: 768px) {
  .pa-container {
    width: 96%;
    max-height: 92vh;
    border-radius: 16px;
  }

  .pa-header {
    padding: 14px 16px;
  }
  .pa-header h2 {
    font-size: 16px;
  }

  .pa-tabs {
    padding: 10px 12px;
    gap: 4px;
  }
  .pa-tab {
    padding: 7px 12px;
    font-size: 12px;
  }

  .pa-body {
    padding: 14px 12px;
  }

  /* 指标卡片：2列 */
  .pa-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .pa-metric-value {
    font-size: 20px;
  }

  /* 配置对比：纵向堆叠 */
  .allocation-compare-grid {
    grid-template-columns: 1fr;
  }

  /* 压力测试：2列 */
  .stress-test-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* 风格详情：2列 */
  .style-details-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* 图表并排改上下 */
  .pa-charts-row {
    flex-direction: column;
  }
  .pa-chart-box.half {
    min-width: auto;
  }

  /* 集中度指标：横向滚动 */
  .conc-metrics {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 8px;
  }
  .conc-item {
    min-width: 90px;
  }
}

@media (max-width: 480px) {
  .pa-metrics-grid {
    grid-template-columns: 1fr;
  }

  .stress-test-grid {
    grid-template-columns: 1fr;
  }

  .style-details-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .style-detail-card {
    padding: 10px;
  }
  .style-value {
    font-size: 18px;
  }
}

/* ==================== 减少动画偏好 ==================== */
@media (prefers-reduced-motion: reduce) {
  .pa-panel.active,
  .pa-metric-card,
  .alloc-card,
  .stress-card,
  .style-detail-card,
  .conc-item {
    animation: none;
    transition: none;
  }
  .pa-bar-fill,
  .alloc-fill,
  .style-bar-fill,
  .mini-fill {
    transition: none;
  }
}

/* ==================== 数据来源警告 ==================== */
.pa-data-source-warning {
  margin-top: 12px;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(251, 146, 60, 0.08));
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.6;
  color: #fbbf24;
}

.pa-data-source-warning strong {
  color: #fcd34d;
  font-weight: 600;
}

/* Badge 样式增强 */
.badge-info {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  color: #60a5fa;
  margin-left: 6px;
  letter-spacing: 0.2px;
}

.badge-warning {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  color: #fbbf24;
  margin-left: 6px;
  letter-spacing: 0.2px;
}

/* 表格中的 Badge */
.pa-table .badge-info,
.pa-table .badge-warning {
  margin-left: 0;
}

/* ==================== 压力测试完整样式 ==================== */
.stress-test-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 12px;
}

.stress-test-grid.historical {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.stress-test-scenario {
  background: linear-gradient(145deg, rgba(25, 25, 45, 0.85), rgba(18, 18, 32, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 16px;
  transition: all 0.25s ease;
}

.stress-test-scenario.warning {
  border-left: 3px solid #f59e0b;
}

.stress-test-scenario.danger {
  border-left: 3px solid #ef4444;
}

.stress-test-scenario.historical {
  background: linear-gradient(145deg, rgba(20, 25, 40, 0.85), rgba(15, 18, 30, 0.9));
}

.stress-test-scenario:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.scenario-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.scenario-icon {
  font-size: 18px;
}

.scenario-name {
  font-size: 14px;
  font-weight: 600;
  color: #e2e8f0;
  flex: 1;
}

.scenario-period {
  font-size: 11px;
  color: #94a3b8;
  margin-bottom: 12px;
  padding-left: 26px;
}

.scenario-market {
  font-size: 11px;
  padding: 3px 8px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 6px;
  color: #f87171;
  font-weight: 500;
}

.scenario-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.scenario-stats .stat-item {
  text-align: center;
  padding: 8px 6px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

.scenario-stats .stat-label {
  display: block;
  font-size: 10px;
  color: #64748b;
  margin-bottom: 4px;
}

.scenario-stats .stat-value {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
}

.scenario-details {
  display: flex;
  gap: 16px;
  font-size: 11px;
  color: #94a3b8;
  margin-bottom: 8px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 6px;
}

.scenario-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.impact-label,
.loss-label {
  font-size: 12px;
  color: #94a3b8;
}

.impact-value {
  font-size: 16px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: #fbbf24;
}

.loss-value {
  font-size: 16px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: #f87171;
}

.scenario-desc {
  font-size: 11px;
  color: #64748b;
  line-height: 1.5;
  margin-top: 4px;
}

.stress-test-recommendation {
  margin-top: 20px;
  padding: 18px 20px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.8;
  color: #cbd5e1;
}

.stress-test-recommendation strong {
  color: #e2e8f0;
  font-weight: 600;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .stress-test-grid {
    grid-template-columns: 1fr;
  }
}

/* ==================== 基准选择器样式 ==================== */
.benchmark-selector-container {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.6), rgba(15, 23, 42, 0.8));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 20px;
}

.benchmark-selector-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.benchmark-label {
  font-size: 14px;
  font-weight: 600;
  color: #cbd5e1;
}

.benchmark-dropdown {
  flex: 1;
  max-width: 200px;
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
}

.benchmark-dropdown:hover {
  border-color: rgba(99, 102, 241, 0.5);
  background: rgba(30, 41, 59, 0.95);
}

.benchmark-dropdown:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.benchmark-dropdown:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.benchmark-dropdown option {
  background: #1e293b;
  color: #e2e8f0;
  padding: 8px;
}

.benchmark-description {
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.5;
}



