/* Portfolio specific styles */
.portfolio-body {
  background: #0E0F1E;
  min-height: 100vh;
  padding: 2rem 1rem;
}

.portfolio-container {
  background: #1C1F2E;
  color: white;
  border-radius: 1.5rem;
  padding: 2rem;
  width: 100%;
  max-width: 1200px;
  margin: 2rem auto;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.back-link {
  position: absolute;
  top: 2rem;
  right: 2rem;
  color: #9CA3AF;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s;
  font-size: 1rem;
}

.back-link:hover {
  color: white;
}

.portfolio-header {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 2rem;
  padding-right: 3rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: rgba(28, 31, 46, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  padding: 1.5rem;
}

.stat-label {
  color: #9CA3AF;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: bold;
}

.stat-value.positive {
  color: #10B981;
}

.percentage {
  font-size: 1rem;
  margin-left: 0.5rem;
}

.time-filters {
  display: flex;
  gap: 1rem;
  margin: 2rem 0;
}

.time-filter {
  padding: 0.5rem 1rem;
  background: none;
  border: none;
  color: #9CA3AF;
  cursor: pointer;
  font-size: 0.875rem;
  transition: color 0.2s;
}

.time-filter.active {
  color: white;
  border-bottom: 2px solid #3B82F6;
}

.chart-container {
  width: 100%;
  height: 400px;
  background: rgba(28, 31, 46, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  margin-bottom: 2rem;
  padding: 1rem;
}

.tabs {
  display: flex;
  gap: 2rem;
  margin: 2rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tab {
  padding: 0.5rem 0;
  color: #9CA3AF;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
}

.tab.active {
  color: white;
  border-bottom: 2px solid #3B82F6;
}

.position-card {
  background: rgba(28, 31, 46, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.position-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.position-icon {
  width: 24px;
  height: 24px;
}

.position-title {
  font-size: 1.125rem;
  font-weight: 600;
}

.position-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.detail-label {
  color: #9CA3AF;
  font-size: 0.875rem;
}

.detail-value {
  font-size: 1.125rem;
  font-weight: 600;
}

.detail-subvalue {
  color: #9CA3AF;
  font-size: 0.875rem;
}

.table-container {
  flex: 1;
  overflow: auto;
  background-color: #1f2937;
  border-radius: 0.5rem;
  margin-top: 1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

th {
  background-color: #374151;
  padding: 0.5rem 1rem;
  text-align: left;
  font-size: 0.875rem;
  font-weight: 500;
  color: #d1d5db;
  position: sticky;
  top: 0;
  z-index: 1;
}

td {
  padding: 0.5rem 1rem;
  text-align: left;
  color: #9ca3af;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.content-section {
  display: none;
}

.content-section.active {
  display: block;
}

@media (max-width: 768px) {
  .portfolio-container {
    padding: 1.5rem;
    margin: 1rem auto;
  }

  .back-link {
    top: 1.5rem;
    right: 1.5rem;
  }

  .portfolio-header {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
  }

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

  .position-details {
    grid-template-columns: 1fr 1fr;
  }
}