.position-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-top: 1rem;
}

.position-table th,
.position-table td {
  padding: 0.45rem 0.6rem;
  border: 1px solid #ddd;
  text-align: right;
  white-space: nowrap;
}

.position-table th:nth-child(-n+2),
.position-table td:nth-child(-n+2) {
  text-align: left;
}

.position-table thead th {
  background: #f0f0f0;
  font-weight: 600;
}

.position-table th.sortable {
  cursor: pointer;
  user-select: none;
}

.position-table th.sortable:hover {
  background: #e0e0e0;
}

.position-table tbody tr:nth-child(even) {
  background: #fafafa;
}

.stock-icon {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  margin-right: 0.35rem;
}

.position-cell {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

.position-bar {
  position: relative;
  width: 120px;
  height: 10px;
  background: #eee;
  border-radius: 5px;
  overflow: hidden;
}

.position-bar__fill {
  height: 100%;
  border-radius: 5px;
}

.position-value {
  display: inline-block;
  width: 3.5rem;
  text-align: right;
  font-weight: 600;
}

.credit {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--color-muted);
  text-align: right;
}
