/* =========================
   Performance Page
   ========================= */

.performance-hero {
  position: relative;
  padding: 120px 0;
  text-align: center;
  background-image: url('/Assets/images/performance-hero-bg.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: white;
}

.performance-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(7, 23, 15, 0.32),
    rgba(7, 23, 15, 0.74)
  );
}


.performance-hero .container {
  position: relative;
  z-index: 1;
}

.performance-hero h1 {
  color: #fff;
}


.performance-hero .hero-sub {
  color: #fff;
}

.page-hero {
  padding: 54px 0 28px;
}

.top-controls {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.pill-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.pill {
  border: 1px solid rgba(214, 162, 67, 0.28);
  background: rgba(14, 30, 20, 0.82);
  color: var(--text-soft);
  padding: 11px 18px;
  border-radius: 12px;
  cursor: pointer;
  transition: 0.2s ease;
}

.pill.active,
.pill:hover {
  color: #fff4d7;
  border-color: rgba(214, 162, 67, 0.55);
  box-shadow: 0 0 22px rgba(214, 162, 67, 0.14);
}

.chart-section,
.metrics-section,
.lower-grid-section,
.bottom-grid-section,
.strategy-section {
  padding: 22px 0 28px;
}

.chart-card {
  padding: 28px 28px 24px;
}

.chart-header h2 {
  margin-bottom: 4px;
}

.chart-header p {
  color: var(--text-muted);
  margin-bottom: 22px;
}

.chart-area {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 18px;
  min-height: 440px;
}

.y-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.95rem;
  padding-top: 8px;
  padding-bottom: 40px;
}

.graph {
  position: relative;
  min-height: 420px;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(7, 19, 13, 0.55), rgba(7, 19, 13, 0.22));
}

.grid-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.line-1 { top: 20px; }
.line-2 { top: 100px; }
.line-3 { top: 180px; }
.line-4 { top: 260px; }
.line-5 { top: 340px; }

.chart-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: calc(100% - 42px);
  overflow: visible;
}

.strategy-line {
  stroke: var(--gold-light);
  stroke-width: 5;
  filter: drop-shadow(0 0 10px rgba(235, 201, 119, 0.3));
}

.benchmark-line {
  stroke: rgba(220, 220, 220, 0.8);
  stroke-width: 4;
}

.chart-tooltip {
  position: absolute;
  right: 18px;
  top: 18px;
  background: rgba(16, 34, 23, 0.96);
  border: 1px solid rgba(214, 162, 67, 0.36);
  padding: 14px 16px;
  border-radius: 14px;
  box-shadow: var(--shadow-gold);
}

.chart-tooltip strong {
  display: block;
  color: #ffe8b5;
  font-size: 1rem;
  margin-bottom: 4px;
}

.chart-tooltip span {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.x-axis {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  color: var(--text-muted);
  padding: 0 10px 4px;
  font-size: 0.95rem;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.metric-card {
  padding: 28px 24px;
  min-height: 148px;
}

.metric-card h3 {
  color: var(--text-soft);
  font-size: 1.18rem;
  font-weight: 500;
  margin-bottom: 14px;
  font-family: "Inter", sans-serif;
}

.metric-card p {
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1;
  color: #f2d396;
  font-family: "Inter", sans-serif;
  font-weight: 500;
}

.metric-card.highlight {
  box-shadow: 0 0 36px rgba(214, 162, 67, 0.12), var(--shadow-card);
}

.lower-grid,
.bottom-grid,
.strategy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.panel {
  padding: 26px 24px;
}

.panel h2 {
  margin-bottom: 18px;
}

.mini-chart {
  position: relative;
  min-height: 230px;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(7, 19, 13, 0.38), rgba(7, 19, 13, 0.12));
}

.mini-grid-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.07);
}

.mini-grid-line:nth-child(1) { top: 30px; }
.mini-grid-line:nth-child(2) { top: 80px; }
.mini-grid-line:nth-child(3) { top: 130px; }
.mini-grid-line:nth-child(4) { top: 180px; }

.mini-chart svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.drawdown-fill {
  fill: rgba(214, 162, 67, 0.58);
  stroke: rgba(235, 201, 119, 0.9);
  stroke-width: 2;
}

.table-wrap {
  overflow-x: auto;
  border-radius: 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
}

thead th {
  text-align: left;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

tbody td {
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-soft);
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody td:last-child,
thead th:last-child {
  text-align: right;
}

.heatmap-table td.pos {
  background: rgba(75, 128, 84, 0.52);
}

.heatmap-table td.neg {
  background: rgba(128, 67, 48, 0.62);
}

.timeline {
  display: flex;
  flex-direction: column;
}

.timeline-item {
  display: flex;
  align-items: flex-start;
}

.dot {
  width: 12px;
  height: 12px;
  margin-top: 8px;
  margin-right: 14px;
  border-radius: 50%;
  background: var(--gold-light);
  box-shadow: 0 0 12px rgba(235, 201, 119, 0.4);
  flex-shrink: 0;
}

.timeline-item strong {
  display: block;
  color: #f6dfaf;
  margin-bottom: 2px;
  font-size: 1.05rem;
}

.timeline-item p {
  color: var(--text-soft);
}

.strategy-panel p {
  color: var(--text-soft);
  margin-bottom: 16px;
}

.strategy-list {
  list-style: none;
  margin: 6px 0 18px;
  display: grid;
  gap: 10px;
}

.strategy-list li {
  color: #f0d69c;
  position: relative;
  padding-left: 18px;
}

.strategy-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--gold);
}

.info-icon {
  display: inline-block;
  margin-left: 6px;
  font-size: 12px;
  cursor: pointer;
  color: #888;
  border: 1px solid #888;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  text-align: center;
  line-height: 14px;
  position: relative;
}

.info-icon:hover {
  color: #fff;
  border-color: #fff;
}

.info-icon::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 130%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 1000;
}

.info-icon:hover::after {
  opacity: 1;
}

@media (max-width: 1100px) {
  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lower-grid,
  .bottom-grid,
  .strategy-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .page-hero {
    padding-top: 36px;
  }

  .top-controls {
    flex-direction: column;
    align-items: flex-start;
  }

  .chart-card,
  .panel {
    padding: 22px 18px;
  }

  .chart-area {
    grid-template-columns: 54px 1fr;
    min-height: 340px;
  }

  .graph {
    min-height: 320px;
  }

  .y-axis {
    font-size: 0.8rem;
  }

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

  .metric-card {
    min-height: 128px;
  }
}

@media (max-width: 480px) {
  .pill {
    width: 100%;
    text-align: center;
  }

  .pill-group {
    width: 100%;
  }
}