.fund-detail-page {
  background-color: #06060A;
  color: var(--text-primary);
}

.fund-page-main {
  padding: 0 16px 32px;
}

.fund-header {
  align-items: flex-end;
  gap: 16px;
}

.fund-back-link {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.fund-back-link:hover {
  color: var(--gold);
}

.fund-header-meta {
  min-width: 180px;
}

.fund-header-meta-value {
  margin-top: 2px;
  font-weight: 700;
  font-size: 12px;
  color: var(--text-primary);
}

.fund-filing-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 11px;
}

.fund-stats {
  display: flex;
  gap: 12px;
  padding: 0 20px 16px;
  flex-wrap: nowrap;
  overflow-x: auto;
}

.fund-stats .card {
  flex: 1 1 0;
  min-width: 0;
  background: #0D0D14;
  border: 1px solid rgba(200,170,80,0.08);
  border-top: 2px solid #C8AA50;
}

.fund-card-text {
  font-size: 16px;
  line-height: 1.2;
}

.fund-hero-section {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 16px;
  padding: 0 20px 16px;
}

.fund-hero-left,
.fund-hero-right {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fund-table-section {
  padding: 0 20px 20px;
}

.fund-panel {
  height: 100%;
}

.fund-panel-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.fund-table-tools {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  min-width: min(320px, 100%);
}

.fund-table-tools .search-box {
  width: min(320px, 100%);
}

.fund-table-count {
  color: var(--text-secondary);
  font-size: 11px;
}

.fund-table-wrap {
  padding: 0;
  overflow-x: auto;
}

.fund-table th:nth-child(4),
.fund-table th:nth-child(5),
.fund-table td:nth-child(4),
.fund-table td:nth-child(5) {
  text-align: right;
}

.fund-table td:nth-child(4),
.fund-table td:nth-child(5) {
  font-variant-numeric: tabular-nums;
  font-family: 'JetBrains Mono', monospace;
}

.fund-empty-state {
  padding: 24px 16px;
  text-align: center;
  color: var(--text-muted);
}

.fund-meta-list {
  display: flex;
  flex-direction: column;
}

.fund-meta-list .stat-row:last-child {
  border-bottom: none;
}

.sector-breakdown {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sector-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.sector-bar-label {
  width: 140px;
  font-size: 11px;
  color: #E8E7E3;
  text-align: right;
  flex-shrink: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sector-bar-track {
  flex: 1;
  height: 22px;
  background: #1a1a24;
  border-radius: 4px;
  overflow: hidden;
}

.sector-bar-fill {
  height: 100%;
  width: 0;
  border-radius: 4px;
  background: linear-gradient(90deg, #C8AA50, #f59e0b);
  transition: width 0.6s ease;
}

.sector-bar-value {
  width: 80px;
  font-size: 11px;
  color: #C8AA50;
  font-family: 'JetBrains Mono', monospace;
  flex-shrink: 0;
}

.sector-bar-count {
  width: 50px;
  font-size: 10px;
  color: #7A7A78;
  flex-shrink: 0;
}

.top-holding-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(200,170,80,0.05);
  font-size: 11px;
}

.top-holding-row:last-child {
  border-bottom: none;
}

.top-holding-name {
  color: #C8AA50;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}

.top-holding-value {
  color: #E8E7E3;
  font-family: 'JetBrains Mono', monospace;
  flex-shrink: 0;
}

.fund-error {
  margin: 20px 0;
  background: rgba(248,113,113,0.08);
  border: 1px solid rgba(248,113,113,0.2);
  border-left: 3px solid var(--risk-critical);
  border-radius: 6px;
  padding: 16px;
  color: var(--text-primary);
}

.monitor-row-link {
  cursor: pointer;
}

@media (max-width: 960px) {
  .fund-hero-section {
    grid-template-columns: 1fr;
  }

  .fund-panel-header {
    flex-direction: column;
  }

  .fund-table-tools {
    align-items: stretch;
  }

  .fund-table-tools .search-box {
    width: 100%;
  }
}

/* 13F holders panel */
.fund-holders-section {
  padding: 0 20px 20px;
}

.fund-data-provenance {
  margin-top: 12px;
}

.holders-source-link {
  color: var(--gold);
  text-decoration: none;
}

.holders-source-link:hover {
  text-decoration: underline;
}

#holders-table th:nth-child(2),
#holders-table th:nth-child(3),
#holders-table td:nth-child(2),
#holders-table td:nth-child(3) {
  text-align: right;
}

#holders-table td:nth-child(2),
#holders-table td:nth-child(3) {
  font-variant-numeric: tabular-nums;
  font-family: 'JetBrains Mono', monospace;
}

@media (max-width: 640px) {
  .fund-page-main {
    padding-left: 0;
    padding-right: 0;
  }

  .fund-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .fund-stats,
  .fund-hero-section,
  .fund-table-section {
    padding-left: 12px;
    padding-right: 12px;
  }

  .sector-bar-row {
    flex-wrap: wrap;
  }

  .sector-bar-label {
    width: 100%;
    text-align: left;
  }

  .sector-bar-value,
  .sector-bar-count {
    width: auto;
  }

  .fund-card-text {
    font-size: 14px;
  }
}

@media (max-width: 768px) {
  .fund-hero-section {
    grid-template-columns: 1fr;
  }
}
